A NE555 timer configured in astable mode sends a 100-microsecond pulse (high current) into the TX coil. The PDF highlights a switching 150 mA at 12V. This creates a collapsing magnetic field.
Do you need a or source code description for a specific microcontroller? inside the metal detector pdf
If you’d like option #2, here’s a complete, original blog post inspired by the principles discussed in Inside the Metal Detector : A NE555 timer configured in astable mode sends