We characterize the dynamical states of a piezoelectric microelectromechanical system (MEMS) using several numerical quantifiers including the maximal Lyapunov exponent, the Poincaré Surface of Section and a chaos detection method called the Smaller Alignment Index (SALI). The analysis makes use of the MEMS Hamiltonian. We start our study by considering the case of a conservative piezoelectric MEMS model and describe the behavior of some representative phase space orbits of the system. We show that the dynamics of the piezoelectric MEMS becomes considerably more complex as the natural frequency of the system's mechanical part decreases.This refers to the reduction of the stiffness of the piezoelectric transducer. Then, taking into account the effects of damping and time dependent forces on the piezoelectric MEMS, we derive the corresponding non-autonomous Hamiltonian and investigate its dynamical behavior. We find that the non-conservative system exhibits a rich dynamics, which is strongly influenced by the values of the parameters that govern the piezoelectric MEMS energy gain and loss. Our results provide further evidences of the ability of the SALI to efficiently characterize the chaoticity of dynamical systems.