How it sees metal
The detector pushes a short burst of current through the coil, then switches it off hard. The coil's magnetic field collapses and the voltage across it dies away in a few microseconds. Metal nearby picks up "eddy currents" that keep the field alive a little longer, so the dying tail stretches out. The Arduino measures the tail at one exact moment after switch-off. A higher reading than normal means metal.
Try it: pick a target, then move it deeper. A deeper target makes a smaller change. A shorter sample delay catches small, fast-fading targets like gold, but too short and you're still inside the switch-off spike.
Block diagram
Four parts: power, a transmitter that pulses the coil, a receiver that clamps and amplifies the tail, and the Arduino that times everything and makes the sound.
Schematic
Orange tags (+12V, +5V, −5V, COIL, D9, A0, BAT) are connections: every tag with the same name is wired together. Scroll sideways on a phone, or download it to print.
What each part does
Q1 + U3: the Arduino's D9 tells the TC4429 driver to slam the P-channel MOSFET on for 60 µs. About 2 amps builds up in the coil. Then it switches off in a fraction of a microsecond.
R3: the damping resistor stops the coil from ringing after switch-off, so the tail is clean.
R4, D1, D2: the coil spikes to about −200 V. The diodes clip that to ±0.7 V so the amplifier only sees the small tail.
U4A, U4B: two fast stages multiply the tail by about 500. D3/D4 keep the signal inside the Arduino's 0–5 V.
Notes
U2 (ICL7660) makes the −5 V the op-amp needs from +5 V. Put C4 in with + to ground.
Keep the wires from Q1, R3 and the coil short and thick. Run the coil cable as twisted pair or coax.
Q1 gets warm: bolt it to a small heatsink.
Decouple every chip: 100 nF right at its power pins.
Search coil
The coil is the antenna. Bigger goes deeper on big objects; smaller is better for coins and gold.
- Draw a 25 cm circle on plywood and drive 16 small nails around it, or use a plastic bucket lid as a former.
- Wind 22 turns of 0.5 mm enamelled copper wire tightly around it. Count carefully.
- Bind the bundle every few centimetres with cable ties or tape, then lift it off.
- Optional shield: wrap in aluminium tape, but leave a 1 cm gap so the shield isn't a closed loop, and connect it to GND.
- Glue the bundle into a plastic or plywood plate. Use only plastic and wood near the coil: no metal screws.
- Scrape the enamel off the ends and solder them to 1–1.5 m of twisted pair or coax to the box.
Deeper for big items: a 45 cm coil with 16 turns (also ≈300 µH).
Parts list
All common parts from any electronics supplier. Roughly $40–60 in total, plus the battery.
| Ref | Part | Notes |
|---|---|---|
| A1 | Arduino Nano (ATmega328P, 16 MHz) | A clone is fine |
| Q1 | IRF9640 P-channel MOSFET, 200 V | Avalanche rated, on a small heatsink |
| U3 | TC4429 6 A inverting MOSFET driver | DIP-8 |
| U4 | NE5532 dual low-noise op-amp | DIP-8, socketed |
| U1 | 7805 5 V regulator | TO-220 |
| U2 | ICL7660 (or MAX1044) voltage inverter | Makes −5 V |
| Q2 | 2N2222 NPN transistor | Speaker driver |
| D1, D2 | 1N4148 diodes | Input clamp |
| D3, D4 | BAT85 Schottky diodes | Protect A0 |
| R1 | 22 Ω | Gate resistor |
| R2, R9, R11 | 10 kΩ | |
| R3 | 470 Ω 1 W | Damping: tune 330–680 Ω |
| R4 | 1 kΩ ½ W | Takes the spike |
| R5, R7, R12 | 1 kΩ | |
| R6, R8 | 22 kΩ | Amplifier gain |
| R10 | 3.3 kΩ | Battery monitor |
| R13 | 220 Ω | |
| R14 | 47 Ω | Speaker volume |
| VR1 | 10 kΩ potentiometer | Sensitivity knob |
| C1, C6 | 100 µF 25 V and 1000 µF 25 V electrolytic | C6 right at Q1's source |
| C2–C4 | 10 µF electrolytic | |
| C5 | 1 µF ceramic | Plus 100 nF on every chip |
| LS1 | 8 Ω speaker, or headphones | Headphones hear faint signals better |
| SW1, SW2, F1 | Power switch, push button, 1 A fuse | |
| BT1 | 12 V: 3S Li-ion pack with protection, or 8×AA | About 60 mA draw |
| L1 | About 20 m of 0.5 mm (24 AWG) enamelled wire | See the search coil section |
| Misc. | Perfboard, plastic box, cable, PVC pipe for the shaft | No metal near the coil |
Arduino code
Upload with the Arduino IDE (board: Arduino Nano, ATmega328P). Open the Serial Monitor at 115200 for tuning readouts.
// Deep Seeker PI-1: pulse induction metal detector
// Lambright.com (Arduino Nano / ATmega328P, 16 MHz)
//
// How it works: a short current pulse is pushed through the search coil.
// When it switches off, the coil's magnetic field collapses. Metal near the
// coil holds on to some of that energy (eddy currents), so the voltage "tail"
// dies away more slowly. We sample the tail a few microseconds after switch-off;
// a bigger reading than the no-metal baseline means metal.
//
// Pins: D9 -> TC4429 IN (coil pulse), A0 <- amplifier, A1 <- sensitivity pot,
// A2 <- battery divider, D3 -> speaker transistor, D2 <- ZERO button (to GND).
const uint8_t SPK_PIN = 3;
const uint8_t ZERO_PIN = 2;
const uint8_t RX_PIN = A0;
const uint8_t SENS_PIN = A1;
const uint8_t BAT_PIN = A2;
const uint16_t PULSE_US = 60; // coil on-time (40-100 us). Longer = more current, more depth, more battery.
uint16_t delayUs = 12; // wait after switch-off before sampling. Tune: see TUNING below.
const uint8_t AVG = 32; // pulses averaged per reading (more = smoother, slower)
const uint16_t PERIOD_US = 2000; // one pulse every 2 ms = 500 pulses per second
long baseline = 0;
unsigned long lastPrint = 0;
// D9 is PB1 on the ATmega328P: direct port writes give clean, fast timing.
inline void coilOn() { PORTB |= _BV(PB1); } // TC4429 inverts: output LOW -> P-MOSFET ON
inline void coilOff() { PORTB &= ~_BV(PB1); } // output HIGH -> MOSFET OFF -> flyback + tail
long readCoil() {
long sum = 0;
for (uint8_t i = 0; i < AVG; i++) {
unsigned long t0 = micros();
noInterrupts();
coilOn();
delayMicroseconds(PULSE_US);
coilOff();
delayMicroseconds(delayUs);
interrupts();
sum += analogRead(RX_PIN); // ~13 us conversion with the fast ADC clock
while (micros() - t0 < PERIOD_US) { }
}
return sum;
}
void beepOK() { tone(SPK_PIN, 880, 80); delay(120); tone(SPK_PIN, 1320, 80); delay(120); }
void setup() {
DDRB |= _BV(PB1); coilOff(); // D9 output, coil off
pinMode(SPK_PIN, OUTPUT);
pinMode(ZERO_PIN, INPUT_PULLUP);
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
ADCSRA = (ADCSRA & 0xF8) | 0x04; // ADC clock /16 (1 MHz): fast enough to catch the tail
analogRead(RX_PIN);
delay(500);
baseline = readCoil(); // hold the coil away from metal when switching on
beepOK();
}
void loop() {
if (digitalRead(ZERO_PIN) == LOW) { // ZERO button: re-learn "no metal" here
baseline = readCoil();
beepOK();
}
long v = readCoil();
long diff = v - baseline; // metal = slower tail = bigger reading
int sens = analogRead(SENS_PIN); // pot: 0 = least sensitive, 1023 = most
long thresh = map(sens, 0, 1023, 400, 6); // in summed ADC units (32 samples)
if (diff > thresh) {
unsigned int f = constrain(250 + (diff - thresh) * 6, 250, 3000); // closer/bigger = higher pitch
tone(SPK_PIN, f);
digitalWrite(LED_BUILTIN, HIGH);
} else {
noTone(SPK_PIN);
digitalWrite(LED_BUILTIN, LOW);
baseline += (v - baseline) / 64; // slowly follow temperature and battery drift
}
if (millis() - lastPrint > 250) { // Serial Monitor at 115200 for tuning
lastPrint = millis();
float volts = analogRead(BAT_PIN) * (5.0 / 1023.0) * (13.3 / 3.3); // R9 10k / R10 3.3k
Serial.print(F("per-pulse reading ")); Serial.print(v / AVG);
Serial.print(F(" baseline ")); Serial.print(baseline / AVG);
Serial.print(F(" diff ")); Serial.print(diff);
Serial.print(F(" delay_us ")); Serial.print(delayUs);
Serial.print(F(" battery ")); Serial.print(volts, 1); Serial.println(F(" V"));
if (volts < 10.5 && volts > 5.0) tone(SPK_PIN, 200, 30); // low battery tick
}
// TUNING from the Serial Monitor: type + or - to change the sample delay.
// Aim for a no-metal "per-pulse reading" between about 100 and 400.
// Reading stuck near 1023 = still inside the flyback: press + (longer delay).
// Reading near 0 = sampling too late, losing depth: press - (shorter delay).
if (Serial.available()) {
char c = Serial.read();
if (c == '+' && delayUs < 60) delayUs++;
if (c == '-' && delayUs > 4) delayUs--;
baseline = readCoil();
}
}
Build & tune
Build
- Build the power section first. Check for +5 V and −5 V before plugging in any chip.
- Add the Arduino and upload the code. You should hear two start-up beeps.
- Add the receiver (U4, R4–R8, R12, D1–D4).
- Add the transmitter last (U3, Q1, R1–R3, C5, C6), then the coil.
- Power on with the coil held in the air, away from metal, and leave it still for the two beeps.
Tune
- Open the Serial Monitor at 115200 and watch the per-pulse reading.
- Stuck near 1023? Type + a few times to sample later. Near 0? Type −. Aim for 100–400.
- Wave a coin under the coil: diff should jump. Turn the sensitivity knob until it just stays silent with no metal.
- Press ZERO whenever the ground or temperature changes.
- If you have an oscilloscope, adjust R3 until the tail drops smoothly with no ringing.
Once tuned, write your best delay into delayUs in the code so it starts there every time.
How deep?
As a rough guide for hobby pulse induction detectors with a 25 cm coil: a coin at roughly 15–25 cm, a fist-size object at roughly 40–60 cm, and large iron deeper. Real depth depends on the target, the soil and your tuning. Big coil = deeper, but misses small gold.
Safety & the law
High voltage: when Q1 switches off, the coil node jumps to about −200 V. Don't touch Q1, R3, R4 or the coil wiring while it's on.
Batteries: use a Li-ion pack with a protection board, and keep the 1 A fuse in place.
Where you dig: ask the landowner first. Many parks, beaches, historic sites and all national parks ban detecting or digging. Report anything that looks like old ammunition or explosives to the police: don't dig it.
Deep Seeker PI-1 is an original Lambright design for learning and hobby use. Check every connection against the schematic before you power up. Want it without an Arduino? See the all-analog PI-2.