QuestMD / Bluetooth-based metal detector program code + wiring diagram + resistor/IC


TX → D2 (Arduino)

RX → D3 (Arduino)

VCC → 5V

GND → GND


A0 → LM358 output

D2 → HC-05 TX

D3 → HC-05 RX

5V aur GND se power


Copper Coil (L1)


30–50 turns

0.4mm–0.6mm enameled copper wire

Metal ke paas jaate hi frequency change hoti hai






Aapke circuit mein ye resistors lagte hain:


R1

10 kΩ

Coil signal balancing

R2

100 kΩ

Op-amp gain set

R3

10 kΩ

Feedback resistor

R4

220 Ω

Transistor bias

R5

1 kΩ

Transistor base limit

R6

220 Ω

Signal stabilizing

R7 (optional)

470 Ω

LED indicator


5V Battery (Mobile power bank / 5V module)

Arduino ke 5V and GND par jata hai





[COIL IN] ---- R1 ---- Pin 3 (1IN+)


Pin 2 (1IN-) ---- R2 ---- GND


Pin 1 (1OUT) ---- C1 ---- Transistor Base (Q1)


Q1 Collector ---- Buzzer +


Q1 Emitter ---- GND

LM358 Output (Pin 1)

        |

        |--- 10k Resistor ---→ Base of Q1 (2N2222 / BC547)

        |

      100nF Capacitor (Noise Filter)


Q1 Collector → Buzzer +

Q1 Emitter → GND


Component List

IC:

LM358 (1x)

Transistor:

BC547 / 2N2222 (1x)

Resistors:

10K (2x)

100K (1x)

1K (1x)

470Ω (1x)

Capacitors:

100nF (2x)

10uF (1x)

Output:

Buzzer / Speaker

Power:

5V–12V battery input


 Code download👈

Ye code Arduino Nano / UNO dono par chalega.


👇👇👇👇👇👇👇👇👇👇

#include <SoftwareSerial.h>


// QuestMD / HC-05 Bluetooth

SoftwareSerial BT(2, 3); // (TX, RX)


// Metal Detector Input

int sensorPin = A0;

int sensorValue = 0;


void setup() {

  Serial.begin(9600);

  BT.begin(9600); // QuestMD Bluetooth baud


  BT.println("QuestMD Connected");

  Serial.println("System Ready");

}


void loop() {

  // LM358 Output Read

  sensorValue = analogRead(sensorPin);


  // Bluetooth par data send

  BT.print("MD:");

  BT.println(sensorValue);


  // Debug

  Serial.print("Metal Signal: ");

  Serial.println(sensorValue);


  delay(50);

}



Bluetooth Metal Detector – Circuit Diagram (ASCII Wiring Diagram)

+5V

                  |

              +---------+

              | Arduino|

              | UNO/Nano|

              +---------+

          A0 ---- Sensor Coil Output

          D2 ---- HC-05 TX

          D3 ---- HC-05 RX

          GND --- Common Ground


   Metal Detection Coil

         (L1)

        +----///////----+

        | |

        | R1 |

        +----/\/\/\-----+


         OP-AMP (LM358)

      +--------------------+

      | +IN --> Coil Out |

      | -IN --> R2/R3 |

      | OUT --> A0 |

      +--------------------+


      Bluetooth Module HC-05

      +----------------------+

      | TX --> D2 (Arduino) |

      | RX --> D3 (Arduino) |

      | VCC --> 5V |

      | GND --> GND |

      +----------------------+