A piezoelectric transducer is a device that converts mechanical energy into electrical energy through the piezoelectric effect, and vice versa. This effect occurs in certain materials that generate an electric charge in response to applied mechanical stress.