A Maker by the name of Dzl (and son) recently built his very own metal detector using an Atmel-based Arduino.
“Most metal detectors use a search coil that act as part of an oscillator circuit. When metal is put in proximity of the search coil both the frequency of the oscillation changes. Many metal detectors uses another more stable oscillator BFO (beat frequency oscillator) to act as a reference for the frequency of the search coil,” Dzl wrote in a blog post.
“Usually the frequency of the BFO is adjusted to exactly match that of the search coil oscillator when no metal is present near this. The signals from these two oscillators are then fed to a (usually analog) circuit that creates an output proportionally to the difference in frequency of the two. This may be either an audible tone and/or some meter reading.”
However, says Dzl, another device that is quite handy at detecting minute frequency changes is a versatile microcontroller (MCU).
“[So] we decided to swap the BFO approach for a microcontroller and came up with [a] simple circuit. The oscillator circuit feeds a 160kHz signal to pin 5 of the Arduino. The Arduino sketch then measures the frequency of this pin very accurately,” Dzl explained.
“When the ‘NULL SW’ button is held this frequency is stored. Any deviation from this frequency is then represented as a series of ‘geiger counter’ clicks on the piezo. The rate of the clicks increases as metal approaches the coil.”
Dzl says he and his son tried a number of different search coils, discovering that approximately 30 turns of wire around a 15cm. plastic bucket worked quite well.
“All we needed then was to tie it all to a discarded Ikea lamp – and hey-presto off to the beach to find treasures. The metal detector has excellent sensitivity and by changing the SENSITIVITY value in the Arduino sketch you are able to tune it for both small and large objects,” he added.
Want to try building your own metal detector with an Arduino? Check out the source code here.