Fake Cricket
From Just in Time
Revision as of 22:19, 27 August 2006 by 80.126.79.70 (talk)
Revision as of 22:19, 27 August 2006 by 80.126.79.70 (talk)
A fake cricket is not a really useful application, but it is very simple to create and can be fun to drive people crazy. Or to hide and seek with children.
If you use a high-impedance speaker, it can be driven directly from the output pins of your microcontroller. A piezo element should also work, but might not give much output power with low voltages.
For a low-impedance speaker a simple 'amplifier' (transistor) should work.
Tip: Instead of connecting your output speaker with one pin to VDD/VSS, more output can be generated by connecting with two output pins and swapping them. This trick seems to work, and I think it works because a speaker is current-driven. For a piezo, it doesn't matter, since a piezo is voltage-driven.