Upgrading uc circuit from piezo to headphones

A solution I've now seen several times for getting simplistic square-wave sound output from a microcontroller (speaking in particular of PIC16Fxx) is to connect a piezo speaker between one of its output pins and ground and simply undulate the output pin using either a delay loop or one of the uc's timer peripherals.

Assuming that the circuit already works as designed, what would one do to modify the circuit for output to headphones (via an audio-taper potentiometer) instead of the buzzer? Would the same thing work to provide line input to a PC sound card? A hi-fi system? A guitar amp?

Understood that this may not have a simple answer, but I know nearly nothing (yet) about the electrical nature of speakers. What should I read to gain a better understanding of the subject?

Thanks PSM

Reply to
Peter S. May
Loading thread data ...

The pulse train sent to a piezo is usually heavily pre-distorted. Unlike regular headphones the cheaper piezos are rather resonant which is undesired but must be lived with. You could AC couple and heavily attenuate but I doubt the sound would be very pleasing without tweaking the pulse train itself.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.