Kenwei a global professional manufacturer of weighers, packing machines, and metal detectors.

simple arduino metal detector

by:Kenwei      2019-08-22
Metal detection is a great past.
Let your time outdoors, discover new places, and maybe find something interesting.
Check your local regulations to learn how to take action in the event of a final discovery, especially in the case of dangerous objects, archaeological sites or objects with important economic or emotional value.
There are a lot of instructions for DIY metal detectors, but this formula is especially important because it only needs a very small number of components except Arduino micro-controllers: The core is a common capacitor, resistor and diode, along with search coils consisting of about 20 conductive cable windings.
Then add LED, speakers and/or headphones to indicate that there is a metal presence near the search coil.
Another advantage is that all power supplies can be powered from a single 5v power supply, for which a normal 2000mAh USB power supply is sufficient and can last for several hours.
To explain the signal and understand what material and shape the detector is sensitive to, it does help to understand physics.
According to the rule of thumb, the detector is sensitive to objects with a distance or depth up to the radius of the coil.
It is most sensitive to an object whose current can flow in the coil plane, and the response will correspond to the region of the current loop in that object.
Therefore, the metal disk on the plane of the coil will give a stronger response than the same metal disk perpendicular to the coil.
The weight of an object is not important.
Thin aluminum foil oriented on the coil plane will produce a stronger response than metal bolts.
When the current begins to flow through the coil, it creates a magnetic field.
According to Faraday\'s law of induction, a change in the magnetic field produces an electric field opposite the change in the magnetic field.
Therefore, the voltage against the increase of current will be generated on the coil.
This effect is called self.
Inductance, the unit of inductance is Henry, when the current changes 1 amp per second, the coil of 1 Henry produces a potential difference of 1 v.
The inductance of the coil with N windings and radius R is about 5 muh x N 2 x R, and R is in meters.
The presence of a metal object near the coil changes its inductance.
Depending on the type of metal, the inductance can be increased or reduced. Non-
Magnetic metals near the coil, such as copper and aluminum, reduce the inductance, because the constantly changing magnetic field creates a vortex in the object, thus reducing the strength of the local magnetic field.
The ferromagnetic material near the coil, such as iron, increases its inductance due to the alignment of the inductive magnetic field with the external magnetic field.
Therefore, the inductance of the measuring coil can reveal the presence of nearby metals.
The inductance of the coil can be measured using Arduino, capacitors, diodes and resistors: Make the coil high-
Feed it with a block through the LR filter
Wave, short spikes will be created in each transition.
The pulse length of these spikes is proportional to the inductance of the coil.
In fact, the characteristic time of the LR filter is tau = L/R.
For 20 coils with a diameter of 10 cm, L ~ 5 muh x 20 ^ 2x0. 05 = 100muH.
To protect the Arduino from over-current, the minimum resistance is 200Ohm.
Therefore, we expect the pulse length to be about 0. 5 microsecond.
Given that the Arduino has a clock frequency of 16 MHz, these are difficult to measure directly with high precision.
Instead, the rising pulse can be used to charge the capacitor and then read out the capacitor with Arduino analog-to-digital conversion (ADC).
Expected fee starting from 0.
The 5 microseconds pulse of 25 mA is 12.
5nC, will give 1.
25v on 10nF capacitor.
The voltage drop on the diode will reduce this.
If several pulses are repeated, the charge on the capacitor rises to 2 v.
This can be read out by using the Arduino ADC of analogRead ().
The capacitor can then discharge quickly by changing the read out pin to output and setting it to 0V for a few microseconds.
It takes about 200 microseconds for the whole measurement, 100 seconds for the capacitor to charge and reset, and 100 seconds for ADC conversion.
The accuracy can be greatly improved by repeated measurement and average results: it takes 50 MS for an average of 256 measurements, and the accuracy is increased by 16 times. The 10-
14-bit ADC accuracy
Such a bit ADC.
This measurement obtained is highly nonlinear with the inductance of the coil, so it is not suitable to measure the absolute value of the inductance.
However, for metal detection, due to the presence of nearby metals, we are only interested in minor relative changes in coil inductance, so this method is very suitable.
The calibration of the measurement can be done automatically in the software.
If one can assume that there is no metal near the coil most of the time, then the deviation from the mean is the signal that the metal approaches the coil.
Using different colors or different tones can distinguish the sudden increase or sudden decrease of the inductance.
Electronic core: Arduino UNO R3 prototype shield or Arduino Nano with 5x 7 cm prototype board 10nF capacitor small signal diodeg. 1N4148 220-
Ohm resistance of the power supply: USB power supply group with visual output cable: 2 LEDs of different colorsg.
Blue and Green 2 220hm resistors that limit sound output current: passive buzzer micro switch for disabling headphone output sound: headphone connector 1kOhm resistor headphones can easily connect/disconnect search coils
Pin screw terminals for search coils: about 5 m thin cable structure for fixing coils.
It must be stiff, but not round.
Structure: 1 M Bar, e.
Wood, plastic or selfie stick.
For the search coil, I wound about 4 m of stranded wire around a cardboard cylinder with a diameter of 9 cm, resulting in about 18 windings.
The type of cable does not matter, as long as the ohm resistance is at least ten times smaller than the R value in the RL filter, so be sure to stay below 20 ohms.
I measured 1 ohm so it was safe.
Only half.
The connection line to complete the 10m volume can also work!
Taking into account the small number of external components, it is entirely possible to install the circuit on a prototype-shielded bun board.
However, the final result is rather large and not very powerful.
A better way is to use the Arduino nano and weld it with additional components on the 5x 7 cm prototype board ,(see next step)
The actual metal detection uses only 2 Arduino pins, one for supplying pulses to the LR filter and the other for reading out the voltage on the capacitor.
Pulses can be made from any output pin, but the reading must be done using analog pin 0-A5.
3 pins are used for 2 led and sound outputs.
The recipe is like this: that\'s all!
To bring the metal detector outside, it must be welded.
The comfortable 7x5 cm prototype board is suitable for the Arduino nano and all the necessary components.
Use the same schematic as the previous step.
I found it useful to add a switch in series with the buzzer to turn off the sound when not needed.
Screw terminals allow different coils to be tried without welding.
Everything is provided (mini-or micro-USB)
Port of Arduino Nano.
The Arduino sketch used is attached here.
Upload and run.
I\'m using Arduino 1. 6. 12 IDE.
It is recommended to run it using debug = true at the beginning in order to adjust the number of pulses per measurement.
It is better to have an ADC reading between 200 and 300.
Increase or decrease the number of pulses in case the coil gives a very different reading.
Sketch made some kind of selfcalibration.
It is enough to keep the coil away from the metal and keep it quiet.
The slow drift in the inductance will follow, but the sudden big change will not affect the long timeterm average.
Since you don\'t want to crawl the treasure hunt on the floor, board boards, coils and batteries should be installed at the end of the stick. A selfie-
The stick is ideal for this as it is light, foldable and adjustable.
My 5000mAh powerbank is just right on the selfie stick.
The board can then be connected with a cable tie or elastic element, and the coil can be similarly connected to the battery or rod.
In order to establish the reference, it is enough to keep the coil away from the metal.
Then, when the coil is close to the metal, the green or blue LED will begin to flash and a beep will be made in the buzzer and/or headphones.
Low blue flash-
Pitch beep sound show that there are non-
Ferromagnetic metal
High Green Flash
Asphalt beeping sounds indicate the presence of iron magnetic metals.
Please note that when the coil remains near the metal for more than 5 seconds, it will take that reading as a reference, and when the detector is removed from the metal, it will beep.
After a few seconds of beeping in the air, it will become quiet again.
The frequency of flashing and beeping represents the strength of the signal. Happy hunting!
Custom message
Chat Online 编辑模式下无法使用
Chat Online inputting...
Thank you for your inquiry. For the many inquiries,we are too busy to contact you in time. Would you leave your contact information? Such as Email, Skype and Whatsapp.we will reply you as soon as possible. Thank you!