Announcement
Collapse
No announcement yet.
Arduino UNO R3 _ Metal Detector Shield
Collapse
X
-
Originally posted by Watanabe View PostI just did the drawing:
Does anyone please check which programming to use or do other programming?
I understand little Arduino.
In the Russian forum confusion which program to use.
Russian language very difficult even with translator.
Gerber Files:
Thank you.

[ATTACH]40062[/ATTACH]
[ATTACH]40063[/ATTACH]
[ATTACH]40065[/ATTACH]
...
-
Have you tried Chrome's automatic translation. Results will obviously be the same as both are Google. But you get more screen (no of that wasted space at the top) and links work better.Originally posted by 6666 View PostI have been trying to read Russian forum with Google translator, so far I am impressed with this project, the 50cm coil works very well, I may make it just to test it
Comment
-
Firmware here (it seems):
Int timer = 700;
Const int button1 = 11; // Button Pin
Int buttonState1 = 0; // button state
Void setup () {
PinMode (button1, INPUT); // input from the button
// pins on LEDs
PinMode (9, OUTPUT); // output to the 1st LED
PinMode (8, OUTPUT); // output to the 2nd LED
PinMode (7, OUTPUT); // output to the 3rd LED
PinMode (6, OUTPUT); // output to the 4th LED
PinMode (5, OUTPUT); // output to the 5th LED
PinMode (4, OUTPUT); // output to the 6th LED
// -----------------
PinMode (12, OUTPUT); // On the gate (base) of the first transistor
PinMode (3, OUTPUT); // output to sound
// Power On Self Test
Tone (3, 500, 500); // turn on at 500 Hz
Delay (100); // waiting for 100 ms
Tone (3, 1000, 500); // turn on at 1000 Hz
Delay (100); // waiting for 100 ms
}
Void loop () {
ButtonState1 = 0;
DigitalWrite (12, HIGH); // fart at the gate (base) of the first transistor
Delay (2);
DigitalWrite (12, LOW);
Int sensorValue = analogRead (A3); // A3 - analog input from the high-frequency part
If (sensorValue <timer) {
DigitalWrite (4, HIGH); // light the 6th LED
DigitalWrite (3, HIGH); // fart in the speaker
} Else {
DigitalWrite (4, LOW); // extinguish the 6th LED
DigitalWrite (3, LOW); // stop farting into the speaker
};};
If (buttonState1 == HIGH) {// If the button is pressed
Timer = sensorValue-5; // Set the timer value to 5 less than the value obtained from the HF
ButtonState1 = 0;
};};
// ---------- display unit ---------------
If (sensorValue <timer-10) {
DigitalWrite (9, HIGH); // If the value of sensorValue differs from the value of timer by more than 10, then the 1st LED is lit
} Else {
DigitalWrite (9, LOW);
};};
If (sensorValue <timer-20) {
DigitalWrite (8, HIGH); // If the value of sensorValue differs from the value of timer by more than 20, then the 2nd LED is lit
} Else {
DigitalWrite (8, LOW);
};};
If (sensorValue <timer-30) {
DigitalWrite (7, HIGH); // If the value of sensorValue differs from the value of timer by more than 30, then the 3rd LED is lit
} Else {
DigitalWrite (7, LOW);
};};
If (sensorValue <timer-40) {
DigitalWrite (6, HIGH); // If the value of sensorValue differs from the value of timer by more than 40, then the 4th LED is lit
} Else {
DigitalWrite (6, LOW);
};};
If (sensorValue <timer-50) {
DigitalWrite (5, HIGH); // If the value of sensorValue differs from the value of timer by more than 50, then the 5th LED is lit
} Else {
DigitalWrite (5, LOW);
};};
Delay (50);
}

...
Comment
-
Using this:
int timer = 700;
const int button1 = 11; //Пин кнопки
int buttonState1 = 0; //состояние кнопки
void setup() {
pinMode(button1, INPUT); //вход с кнопки
// пины на светодиоды
pinMode(0, OUTPUT); //выход на 1-й светодиод
pinMode(1, OUTPUT); //выход на 2-й светодиод
pinMode(2, OUTPUT); //выход на 3-й светодиод
pinMode(3, OUTPUT); //выход на 4-й светодиод
pinMode(4, OUTPUT); //выход на 5-й светодиод
pinMode(5, OUTPUT); //выход на 6-й светодиод
//-----------------
pinMode(12, OUTPUT); //На затвор (базу) первого транзистора
pinMode(6, OUTPUT); //выход на звук
//Power On Self Test
tone (6, 500, 500); //включаем на 500 Гц
delay(100); //ждем 100 Мс
tone(6, 1000, 500); //включаем на 1000 Гц
delay(100); //ждем 100 Мс
}
void loop() {
buttonState1 = 0;
digitalWrite(12, HIGH); //пукаем на затвор (базу) первого транзистора
delay(2);
digitalWrite(12, LOW);
int sensorValue = analogRead(A3); //A3 - аналоговый вход с ВЧ части
if (sensorValue<timer){
digitalWrite(5, HIGH); //зажигаем 6-й светодиод
digitalWrite(6, HIGH); //пукаем в динамик
} else {
digitalWrite(5, LOW); //тушим 6-й светодиод
digitalWrite(6, LOW); //прекращаем пукать в динамик
};
if (buttonState1 == HIGH) { //Если кнопка нажата
timer = sensorValue-5; //Устанавливаем значение timer на 5 меньше, чем значение, полученное с ВЧ
buttonState1 = 0;
};
//----------блок индикации---------------
if (sensorValue<timer-10){
digitalWrite(0, HIGH); //Если значение sensorValue отличается от значения timer больше, чем на 10, то 1-й светодиод горит
} else {
digitalWrite(0, LOW);
};
if (sensorValue<timer-20){
digitalWrite(1, HIGH); //Если значение sensorValue отличается от значения timer больше, чем на 20, то 2-й светодиод горит
} else {
digitalWrite(1, LOW);
};
if (sensorValue<timer-30){
digitalWrite(2, HIGH); //Если значение sensorValue отличается от значения timer больше, чем на 30, то 3-й светодиод горит
} else {
digitalWrite(2, LOW);
};
if (sensorValue<timer-40){
digitalWrite(3, HIGH); //Если значение sensorValue отличается от значения timer больше, чем на 40, то 4-й светодиод горит
} else {
digitalWrite(3, LOW);
};
if (sensorValue<timer-50){
digitalWrite(4, HIGH); //Если значение sensorValue отличается от значения timer больше, чем на 50, то 5-й светодиод горит
} else {
digitalWrite(4, LOW);
};
delay(50);
}
All LEDs always on.
Beep always fires.
Button has no function whatsoever. Does it not interfere with anything?
Some error?
Any suggestion?
Thank you.

...
Comment
-
Originally posted by bernte_one View Postyou should read hole thread
you will also find the ino file for arduino
https://www.youtube.com/watch?v=uyiV...ature=youtu.be
Just change the pins I'm using.
My 22AWG coil; 22 turns; 23cm diameter; 1 ohm; 325uH.
Resistors of 68 ohm and 47 ohm, but I also changed to 68K and 47K.
Still not working ...
Let's try ...
Thanks.

...
Comment
...
...)
Comment