This cool little Pocket Metal Locator is sensitive enough to identify small nails and tacks in wood and compact enough to fit into awkward spaces making it convenient to carry and use for metal locating.
The unit has four independent search coils and color LED indicators making it easy to cover a larger search area quickly while being able to accurately identify the target.
This neat little device is self-calibrating with one button operation, rechargeable through a USB port and uses color LEDs, sound and vibration to indicate target strength.
Included in the instructable is all of the designs, testing, code and 3D files required to build on your own. I hope you enjoy building and using this as much as I have!!
Step 1: Materials List and How It Works
1. How it works
The Pocket Metal Locator uses four independent Pulse Induction Search Coils powered by an Arduino Pro Mini. Each Search Coil is made up of a separate TX and RX coil where a pulse is induced into the TX coil which creates an electromagnetic field around the RX coil. The changing field induces a voltage into the RX coil which is detected and amplified before the pulse width of the signal is read by the Arduino.
A smoothing algorithm in the Arduino code is used to remove noise from valid pulses making it very stable.
A calibration algorithm in the code takes an average of readings over a short period of startup and sets a series of thresholds to compare the signal against.
When a metal object comes within range of the electromagnetic field the field is disrupted and some of the energy is diverted from the RX coil into “Eddie currents” that form in the target object. This parasitic effect of the target object results in the pulse width detected in the RX coil reducing. Essentially we are measuring the loss of power into the target object.
When the pulse width detected in the RX coil drops below the threshold then the LEDs are lit, the buzzer is sounded and the Haptic Feedback motor triggered – dependent on a predetermined size of the target signal.
The circuit for this has evolved over the past year into a very stable and reliably performing detector. The coil configuration and orientation have been deliberately designed to maximize stability and depth detection.
2. Materials List
- 3.7v 350mAh LiPo Battery Size: 38mm x 20mm x 7.5mm
- TP4056 USB LiPo Battery ChargerData Sheet
- 4.7K resistor to limit LiPo battery charge current to below 300mA
- Arduino Pro Mini
- FTDI USB to Serial Module for Programming the Mini Pro
- LM339 Quad Differential Comparator Integrated Circuit
- Vero Board – 2 pieces cut to 20×9 holes and 34×9 (see photo for correct orientation)
- BC548 NPN Transistor x 4
- 2N7000 MOSFET Switch x 5
- Piezo Buzzer
- Coin Vibration Motor for Haptic Feedback
- WS2812 RGB LED Module x 4
- 1k Resistor x 4
- 10k Resistor x 4
- 47 Ohm Resistor x 4
- 2.2K Resistor x 4
- 150pf Ceramic Capacitor x 8
- 0.18uF Polyester capacitor x 4
- Roll of 0.3mm Enamel Copper Wire (normally come in rolls approx 25g Weight)
- PCB Mounted Push Button Switch
- Hot Glue Gun
- 10mm Drill Bit
- Handheld Drill
- Label Gun or Sticky Tape suitable to label 16 separate wires Hookup wire
- Access to a 3D Printer
3. Comparator Operation
I have had a number of questions about the operation of the LM339 so I thought I would give a more clear explanation.
The LM339 operates solely as a voltage comparator, comparing the differential voltage between the positive and negative pins and outputting a logic low or high impedance (logic high with pullup) based on the input differential polarity.
In this circuit, the positive input of the comparator is connected to the Vcc line and a pull-up resistor to Vcc is applied to the comparator output. In this configuration, in practice, the output voltage of the comparator stays high, until the input voltage on the negative input exceeds 3.5v
The operation can be explained from the LM339 Data Sheet which outlines the “input voltage range” being between 0 V to Vsup-1.5 V
When both IN– and IN+ are both within the common-mode range, if IN– is lower than IN+ and the offset voltage, the output is high impedance and the output transistor is not conducting
When IN– is higher than common mode and IN+ is within common mode, the output is low and the output transistor is sinking current. Link to Data Sheet and explanation below http://www.ti.com/lit/ds/symlink/lm2901.pdf
Step 2: Print the Case
The 3D printed case was done using 5 separate prints. The dimensions and 3D files can be found here on Thingiverse . The design was centered on making the device easy to hold while ensuring the search coils were as close to the area being searched.
Carefully print out the case and remove excess plastic. It is important to do this step now so the electronic components can be aligned in the case before final hookup and testing.
I included a picture of multiple different case designs that I tested before settling on the final design which was more compact and ergonomically pleasing to hold.
Step 3: Build and Mount the Search Coils
Take the printed coil formers and wind 25 turns of copper wire onto each of them. Ensure you leave a good 20cm of extra copper wire for hookup to the main unit.
Use the holes printed in the formers to enable a consistent wind and orientation of coils for each former. As you do this, turn the former upside down and progressively glue the former into the base unit.
Follow the photo assembly as provided, the outcome being 8 coils mounted in the coil assembly with all wires consistently orientated, and long enough to connect to the main board unit in the upper enclosure.
Use the two wire guide blocks which have holes for each coil the printed base to keep track of each specific coil.
I placed the wires for the Inner Coils along the top and the outer coils along the bottom of the wire block so that I could keep track of each specific coil which makes it easier for connecting to the main board.
Step 4: Build the Circuit
The unit has four key circuits to build independently – Driver Board, Main Board, LED assembly and Rechargeable Power Supply. In this step, we will build the Driver Board and Main Board.
1. Driver Board
Use a craft knife to cut a piece of Vero Board along the holes 22×11 the result being a piece of Vero Board with 20×9 holes oriented as per the included picture. It’s best to score across the holes on both sides of the board multiple times then gently snap off the excess board. Check that the board sits in the base of the enclosure with enough clearance on either side.
Using the photos and a 10mm Drill bit by hand carefully break the tacks shown on the bottom of the Vero Board. Follow the circuit Diagram and photo layout of components to assemble the circuit board being careful to ensure there are not shorted tracks.
Set this board aside for testing later.
2. Main Board
Use a craft knife to cut a piece of Vero Board along the holes 36×11 the result being a piece of Vero Board with 34×9 holes oriented as per the included picture. It’s best to score across the holes on both sides of the board multiple times then gently snap off the excess board. Check that the board sits in the base of the enclosure with enough clearance on either side.
Using the photos and a 10mm Drill bit by hand carefully break the tacks shown on the bottom of the Vero Board.
Follow the circuit Diagram and photo layout of the Arduino and LM339 IC and other components to assemble the circuit board being careful to ensure there are not shorted tracks.
Set this board aside for testing later.
Source: Pocket Metal Locator – Arduino