An AT2313 microcontroller excites a tuned circuit. A comparator in the AT2313 detects the zero crossing causing an interrupt and the interrupt service routine provides an impulse to the tuned circuit to maintain the oscillation. The frequency is measured with a counter timer. A change in frequency generates clicks on the Piezo sounder to indicate the presence of metal. Debug information is presented on the serial interface.


Sat, 25 May 19 01:08:54 +0000
source code