Second version of coil, 28 turns around an 84mm (3.3in) diameter cylinder.

This page describes how the components are used on the breadboard to make the circuit for the metal detector. It also describes how to make and connect the coil.


The components in the circuit are:

  • R1 - 1k resistor.
  • D2 - 1N4148 signal diode (there is no D1).
  • C1 - 0.1uF (100nF) ceramic capacitor. These small capacitors are often labelled "104".
  • L1 - home-made coil.

The prototype was made with a 1N4004 rectifier diode and also tested with a germanium diode from a crystal radio set, both worked well and could be used as alternatives to the 1N4148 diode.

Coil Construction

A coil with about 4-8m (13-26ft) is a good starting point to avoid using too much wire. Insulated wire will work but "enamelled" copper wire allows a more compact coil. The enamel is a misnomer, the coating will be something like polyurethane varnish. This insulation must be scraped or burnt off with a soldering iron at the ends to expose the copper to connect it to the circuit.

The coil shown at the top of the page is enamelled 0.56mm wire wrapped around an 84mm tube (3.3in). It has 12 coils then 9 more coils over those then 7 coil more coils over those totalling 28. Placing the coils close to the edge improves the effective search range but care needs to be taken to ensure the coil does not fall off! A tiny ridge has been made on end of the tube with masking tape to reduce that risk.

The coil either needs to be very tight or held in place as movement of the wire in the coil will subtly affect the inductance and parasitic capacitance of the coil.

A prototype coil was also made (not shown) with 20 turns around a core of a roll of masking tape with diameter 116mm (4.6in). This worked well too.

Circuit Construction

The diagrams and pictures below show how the circuit can be implemented on a breadboard for the three different configurations.

CLUE board

The breadboard showing the use of the Dragontail breakout board to connect CLUE's #0 (P0) and #1 (P1) pads to circuit. The small inductor coil represents the large coil.

The coil needs to be connected to the breadboard. The options are:

  • Thick solid core wire may be directly inserted into the breadboard. Tinning the end with solder will increase the diameter of a wire and tame multi-strand wire.
  • A connector cable with male pins to alligator (crocodile) clips or hooks (shown below). These will be needed for the Adafruit enamelled wire.
Breadboard for metal detector circuit. The CLUE is connected via a KItronik Edge Connector Breakout Board out of shot. The blue and black leads at the bottom go to the coil. The diode is a 1N4148 signal diode.

The CLUE board can be connected using the Dragontail or alligator clips.

  • #0 (P0) yellow wire - this is the square wave output.
  • #1 (P1) green wire - this is an analogue input measuring the voltage across the capacitor.
  • GND black wire - this is only required if not using the  Dragontail. The Dragontail directly connects to the power rails on one side of the breadboard.
It's best to insert or remove a CLUE board from an edge connector with the power off to prevent inadvertent, transient short circuits.

Everything can be seen connected together in the picture below. A Kitronik Edge Connector Breakout Board for BBC micro:bit (over the top half of the breadboard) and Pimoroni IC hooks with pigtails (to connect the coil) have been used for this implementation.

Metal detector fully assembled. The blue and black wires/hooks to the inductor have been accidentally swapped around for this photo - the electrons will not be concerned about this.

The circuit can only be tested once the CLUE has the CircuitPython program on it. This is described on the next page.

If alligator clips are used they need to be carefully placed in the centre of the pad and protected from accidental nudges which could cause the alligator clip to connect across the small pads either side of #0, #1 or GND.

Circuit Playground Bluefruit with TFT Gizmo

The CPB board pads are not really accessible when the TFT Gizmo is attached and most of them are used for the Gizmo. The Gizmo has 3-pin STEMMA connectors for accessing A1 and A2. A pair of STEMMA 3-Pin to male cables are required to connect this to the breadboard.

The breadboard showing the Gizmo's STEMMA connections to the circuit. The small inductor coil represents the large coil. Note: 1k resistor is not needed here.

The connections are:

  • A1 STEMMA (square wave output):
    • red - breadboard red (+) rail (not used).
    • white (yellow sleeves) - breadboard b22.
    • black - breadboard black (-) rail.
  • A2 STEMMA (analogue input):
    • red - breadboard red (+) rail (not used).
    • white (green sleeves) - breadboard e26.
    • black - breadboard black (-) rail.
Metal Detector fully assembled. The TFT Gizmo is mounted on a Circuit Playground Bluefruit. The STEMMA cables have small sleeves on white signal cable to help distinguish them.

The TFT Gizmo has its own 1k resistors on the A1/A2 GPIO making the resistor on the breadboard superfluous.

The red power lines are not used but plugging the pins into the breadboard prevents them from accidentally contacting other components or shorting to ground.

The red power lines from the STEMMA connector on the TFT Gizmo are at VOUT level, i.e. 5V for USB power or the battery voltage.

Circuit Playground Bluefruit board only

The program still runs without a screen on a CPB board in audio/light mode.

The connections are:

  • A1 (square wave output) - yellow wire - breadboard a18.
  • A2 (analogue input) - green wire - breadboard e26.
  • GND - black wire - breadboard black (-) rail.
The breadboard showing the Circuit Playground Bluefruit connections to the circuit. The small inductor coil represents the large coil. Note: 1k resistor is needed here.

This guide was first published on May 13, 2020. It was last updated on Feb 21, 2024.

This page (Circuit) was last updated on Apr 20, 2020.

Text editor powered by tinymce.