Металлодетектор на основе широко известного МД Пират. Добавлено отображение усиленного сигнала на экране смартфона - если сигнал сильный, можно до некоторой степени различать металлы. Для нормальной работы необходима расширенная ( платная) версия ПО remotexy.com

Фото:

Cхема металлоискателя:

Видео работы: http://dfiles.ru/files/o1evbqe00 http://alex---1967.narod.ru/MVI_4970_md_ardu_disc.mov

ПО:

 /*
-- MD smart project_3 --
*/

//////////////////////////////////////////////
// RemoteXY include library //
//////////////////////////////////////////////

// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__HARDSERIAL

#include <RemoteXY.h>

// RemoteXY connection settings
#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 115200


// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255,4,0,75,0,125,3,8,13,4,
66,1,2,8,4,47,1,2,26,66,
1,3,8,4,47,1,2,26,66,1,
4,8,4,47,1,2,26,66,1,5,
8,4,47,1,2,26,66,1,6,8,
4,47,1,2,26,66,1,7,8,4,
47,1,2,26,66,1,8,8,4,47,
1,2,26,66,1,9,8,4,47,1,
2,26,66,1,10,8,4,47,1,2,
26,66,1,11,8,4,47,1,2,26,
66,1,12,8,4,47,1,2,26,66,
1,13,8,4,47,1,2,26,66,1,
14,8,4,47,1,2,26,66,1,15,
8,4,47,1,2,26,66,1,16,8,
4,47,1,2,26,66,1,17,8,4,
47,1,2,26,66,1,18,8,4,47,
1,2,26,66,1,19,8,4,47,1,
2,26,66,1,20,8,4,47,1,2,
26,66,1,21,8,4,47,1,2,26,
66,1,22,8,4,47,1,2,26,66,
1,23,8,4,47,1,2,26,66,1,
24,8,4,47,1,2,26,66,1,25,
8,4,47,1,2,26,66,1,26,8,
4,47,1,2,26,66,1,27,8,4,
47,1,2,26,66,1,28,8,4,47,
1,2,26,66,1,29,8,4,47,1,
2,26,66,1,30,8,4,47,1,2,
26,66,1,31,8,4,47,1,2,26,
66,1,32,8,4,47,1,2,26,66,
1,33,8,4,47,1,2,26,66,1,
34,8,4,47,1,2,26,66,1,35,
8,4,47,1,2,26,66,1,36,8,
4,47,1,2,26,66,1,37,8,4,
47,1,2,26,66,1,38,8,4,47,
1,2,26,66,1,39,8,4,47,1,
2,26,66,1,40,8,4,47,1,2,
26,66,1,41,8,4,47,1,2,26,
66,1,42,8,4,47,1,2,26,66,
1,43,8,4,47,1,2,26,66,1,
44,8,4,47,1,2,26,66,1,45,
8,4,47,1,2,26,131,1,12,1,
22,5,1,2,31,77,97,105,110,32,
80,97,103,101,0,131,0,64,1,22,
5,2,2,31,77,111,100,101,32,80,
97,103,101,0,7,52,4,27,45,13,
2,2,26,2,7,52,56,27,39,13,
2,2,26,2,129,0,7,13,36,5,
2,17,70,82,69,81,85,69,78,67,
89,32,44,32,0,129,0,57,12,39,
5,2,17,80,85,76,83,69,32,87,
73,68,84,72,32,44,32,0,129,0,
58,19,34,5,2,17,109,105,107,114,
111,115,101,99,111,110,100,115,0,129,
0,19,19,6,5,2,17,72,122,0,
129,0,10,45,28,6,2,17,208,167,
208,144,208,161,208,162,208,158,208,162,
208,144,0,129,0,54,44,42,6,2,
17,208,148,208,187,208,184,209,130,208,
181,208,187,209,140,208,189,208,190,209,
129,209,130,209,140,0,129,0,60,51,
29,6,2,17,208,184,208,188,208,191,
209,131,208,187,209,140,209,129,208,176,
0,66,1,46,8,4,47,1,2,26,
66,1,47,8,4,47,1,2,26,66,
1,48,8,4,47,1,2,26,66,1,
49,8,4,47,1,2,26,66,1,50,
8,4,47,1,2,26,66,1,51,8,
4,47,1,2,26,66,1,52,8,4,
47,1,2,26,66,1,53,8,4,47,
1,2,26,66,1,54,8,4,47,1,
2,26,66,1,55,8,4,47,1,2,
26,66,1,56,8,4,47,1,2,26,
66,1,57,8,4,47,1,2,26,66,
1,58,8,4,47,1,2,26,66,1,
59,8,4,47,1,2,26,66,1,60,
8,4,47,1,2,26,66,1,61,8,
4,47,1,2,26,66,1,62,8,4,
47,1,2,26,66,1,63,8,4,47,
1,2,26,66,1,64,8,4,47,1,
2,26,66,1,65,8,4,47,1,2,
26,66,1,66,8,4,47,1,2,26,
66,1,67,8,4,47,1,2,26,66,
1,68,8,4,47,1,2,26,66,1,
69,8,4,47,1,2,26,66,1,70,
8,4,47,1,2,26,66,1,71,8,
4,47,1,2,26,66,1,72,8,4,
47,1,2,26,66,1,73,8,4,47,
1,2,26,66,1,74,8,4,47,1,
2,26,66,1,75,8,4,47,1,2,
26,66,1,76,8,4,47,1,2,26 };

// this structure defines all the variables of your control interface
struct {

// input variable
int16_t frequency; // -32767.. +32767
int16_t pulse_width; // -32767.. +32767

// output variable


int8_t level[75]; // =0..100 положение уровня


// other variable
uint8_t connect_flag; // =1 if wire connected, else =0

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////

int period = 1000; // начальный период по умолчанию 1000мкс, следовательно частота 1000гц
// frequency = 1000000 / 1000 = 1000 Hz

byte out_PIN = 3;

unsigned long currentMicros = 0;

unsigned long previousMicros = 0; // will store last time

unsigned long interval = 10; // interval (microseconds)

int level_i[76];

void setup()
{
RemoteXY_Init ();

pinMode(out_PIN, OUTPUT);

RemoteXY.frequency = 220;
RemoteXY.pulse_width = 40;


}

void loop()
{
RemoteXY_Handler ();

period = 1000000 / RemoteXY.frequency;

for (int i=1; i<76; i++) {

digitalWrite(out_PIN, HIGH);
delayMicroseconds(RemoteXY.pulse_width);
digitalWrite(out_PIN, LOW);

currentMicros = micros();
previousMicros = currentMicros;
interval = i * 4;

while ( (currentMicros - previousMicros ) < interval ) {
currentMicros = micros();
}

if ((currentMicros - previousMicros) >= interval) {

// take the value:
level_i[i] = analogRead(A6);
}

while ( (currentMicros - previousMicros ) < period ) {
currentMicros = micros();
}

previousMicros = currentMicros; // save the last time you take the value


RemoteXY.level[i] = (level_i[i] / 4 - 75);

}


}

 

 

слова для поиска     металлоискатель на андроид    металлоискатель Пират на андроид   металлоискатель пират на андроиде        

 

                 Главная страница  Main Page                               Страница Моё Авто   My Cars