An electromechanical system for characterization of piezoelectric materials