Loading...
Pages: 1 [2]   Go Down
Author Topic: Arduino metal detector?  (Read 7831 times)
0 Members and 1 Guest are viewing this topic.
Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 31
Hamradio callsign: PG4I
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The stuart detectors won't discriminate between different metals. I have built the first version a while back. The Chance detector uses a ATMega8 to investigate the decaying coil voltage. From this we can deduct what type of metal is under the coil. You don't want to dig for iron!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 32
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The stuart detectors won't discriminate between different metals. I have built the first version a while back. The Chance detector uses a ATMega8 to investigate the decaying coil voltage. From this we can deduct what type of metal is under the coil. You don't want to dig for iron!

Are you sure about that? Digging up a nice old cannon would be worth it. =)
Logged

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 31
Hamradio callsign: PG4I
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yeah, but digging for rusted nails isn't fun when you want to find a nice old coin.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 32
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah that would suck.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


This russian project on PIC12F629 controller. Maybe use Arduino ? 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This my test schema


long t_1 = 0; // переменная для хранения времении работы программы в мкс
long t_2 = 0; // переменная для хранения времении работы программы в мкс

float L = 0; // вычесленное значение разницы времени
int A=0; //напряжение на аналоговом входе


void setup()
 {
pinMode(13, OUTPUT); // установка выхода 13 на выход
Serial.begin(9600); // будем записывать в COM-порт
 }

void loop()
 {
 // блок контроля нулевого тока через резистор
 digitalWrite(13, LOW);
 while (analogRead (0) != 0 )
 {
 }

 
 digitalWrite(13, HIGH); // +5В вольт на ножку 13
 t_1 = micros(); // чтение времении от начала работы программы в мкс
 A=analogRead (0);

 while ( A > 250 ) // пустой цикл работает когда напряжение на ножке более чем надо
 {
 A=analogRead (0);
 }
 t_2 = micros(); // чтение времении от начала работы программы в мкс

 L = sqrt(float(t_2 - t_1)); // вычисление индуктивности L.

 Serial.println(L); // вывод времени на экран
 }
Logged

Melbourne, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 18
The Antipodean Tinkerer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

G'day guys! Any update on the results of your tests?
Logged

Any sufficiently advanced technology is indistinguishable from magic.
- Arthur C. Clarke

United Kingdom
Offline Offline
Faraday Member
**
Karma: 131
Posts: 4690
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've recently had a play with building a metal detector using an Arduino. First I tried a PI detector inspired by http://www.miymd.com/index.php/projects/tpimd/. That design uses an ATtiny for the receiver, which can do very accurate timing of the decay signal because the ATtiny has a 64MHz fast perhipheral clock. Unfortunately, the Arduino does not have the fast clock, so the timing resolution is 4 times worse. Also, the only mosfets I had available had a Vds rating of 60V, whereas the FQPF7N65C in the original has a breakdown voltage of 650V. So I had to use a shorter pulse and in consequence a lower pulse amplitude. Both of these factors meant that the sensitivity of the detector was poor.

I then tried an induction balance detector. I used timer 1 to generate a 62.5kHz signal, and fed this to timer 2 to generate a 7.8125kHz square wave. I tuned the Tx coil to this frequency using a parallel capacitor, and fed the square wave to the coil/capacitor via a 2.2K resistor, to get a nice 7.8kHz sine wave across the coil. I tuned the receive coil using a another parallel capacitor, and amplified it using an LM358 configured as a bandpass amplifier. Originally I used 2 stages of amplification, but 1 turned out to be sufficient (gain = 50). The output goes into the Arduino ADC, which is set to start a conversion on each cycle of the 62.5kHz signal (I ran the ADC clock at 1MHz and accepted 8-bit accuracy). So the ADC takes 8 readings per cycle, which the code accumulates into 4 bins over around 8000 samples. A little bit of processing improves the sensitivity and cancels the 3rd harmonic, calculates the amplitude measured at 4 points in the cycle, and the phase between the received and transmitted signals.

In summary, the Arduino is used as the transmit signal generator and 4 phase sensitive detectors. This arrangement turned out to be extremely sensitive. As with all induction balance detectors, coil balance is very critical. I also trimmed out the stray capacitance between transmitter and receiver. My original experiments used a double-D coil, but I'm planning to make up concentric coils + bucking coil because I think that will be easier to keep stable.

I summary, using an Arduino as a PI detector requires some extra electronics on the receiving side (maybe a pulse gate and an integrator feeding the ADC would be sufficient); but it makes a good IB detector if you amplify the received signal before passing it to the ADC.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com

Pages: 1 [2]   Go Up
Print
 
Jump to: