I have read Mel's explanation about how to connect piezos.
So I made this project as you can see it here. It is connected in parallel with an electric doorlock.<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3886&stc=1&d=126354649 5">
*don't trust the PIC's pins connections on this shema - I used a 12F675 component in EAGLE just for the drawing - I couldn't find a 10F202.
When I power the circuit with 6 to 8V DC for testing, it works fine and the piezo sounds loud and clear.
When the circuit is connected to the AC power supply that goes up to 18VAC, no sound comes from the piezo anymore (?!).
The strange thing is, the piezo seems to affect the voltage regulator ability to provide a stable 5V. In fact, the voltage regulator doesn't supply a constant 5VDC but goes up to 7VDC.
I added a decoupling 100nF (in fact, I connected different capas for test - none did the trick) capacitor in serie with the piezo but this didn't change anything.
I replaced the piezo by a 5V led and then, the voltage regulator has no problem and feeds a steady 5VDC while the circuit is fed with 18VAC.
My oscilloscope shows some disturbances on the output of the voltage regulator when the piezo is connected and nothing with the led. But how do I get rid of them?
Any idea what the piezo does?
My piezo's datasheet is here: http://datasheet.octopart.com/HGP-05...eet-580811.pdf
Bookmarks