If the video player is not working, you can click on this alternative video link.
Everyone loves metal detecting. But when you combine it with remote-controlled robots, the experience is taken to a whole new level.
Read on to find out how to build one for yourself!
Like most projects of this nature, you'll need a few basic tools (listed below) and some other components.
We have included links to some of the products in case you need to buy them:
Main components:
- 2 no. Arduino RF Nano
- 2 no. 1.2A DC Motor Driver (TB6612FNG)
- 4 no. TT Gear Motor
- 4 no. Rubber Wheels
- 1 no. Metal Detector Module
- 2 no. Joystick Module
- 1 no. 1602 I2C LCD DISPLAY
- 4 no. 18650 Li-ion Battery
- 2 no. 18650 Battery Holder
- 3 no. Screw Terminal
- Various 3D parts. The models for these are available from Thingiverse.
- Custom PCB board.
- Various bolts and nuts.
Other gear needed:
- Soldering Kit
- Screwdriver set
- Electrical wires and soldering gear.
- Assorted PCB wire female connectors and male pins.
Now that you've gathered together/order in what you need, the first thing to do is to print all the required 3D-printed parts. You can find the parts models here.
The creator used an Anet ET4 3D printer but you can use any 3D printer capable of printing them.

Next, take the TT gear motors and bolt them to the correct 3D printed component mounts. You will be using all four, plus two mirror image 3D mounts.
Watch the video for more details on which pieces to use.

Mount the TT gears and mounts to the main box base.

Next, take the rubber wheels, and mount them into place on the TT gears.

Next, wire up the motors as shown in the video. With that stage complete, turn over the robot.
Now grab the battery holder and mount it into the center of the robot chassis.

With most of the mechanical bits sorted, it is now time to turn our attention to the micro-electrical gubbins.
Here are the circuit diagrams.

Build the PCB as shown, with the components required. Then insert the Arduino RF Nano, and the DC Motor Driver onto the board.
Place the completed PCB board into the belly of the robot, as shown in the video. Next, wire up as shown.

Next, grab the metal detector module. Wire up and solder as instructed. Secure the metal detector module to its relevant 3D printed mounting, as well as, the positioning arm.
Attach the entire metal detecting assembly to the front of the main robot assembly as shown.

Wire up to the previously completed PCB. Now upload the code to the Arduino RF Nano.
The code is pretty long so we have included at the end of this instruction guide. There are two sets of code, one is for the remote control, and the other is for the robot.
Ensure you load the RX code to the robot's Arduino. Watch the video for more details. Now place the lid on top of the robot and we've completed half the project (more or less).

Insert two of the batteries to the battery holder and the robot is ready to go.
Now it is time to build the remote control. Grab the LCD display and mount it into the front face of the remote control.

Now grab the joystick modules and mount onto the rear plate of the remote controller. Screw into place.

Next, it is time to build the main PCB for the remote control. Here is the circuit diagram.

Assemble as instructed and solder components into place, where required. Mount the second Arduino RF board into place on the PCB, and affix to the rear plate of the remote controller 3D printed piece.

Wire up the joysticks to the PCB, as shown in the video.

Next, take the second battery holder, and affix it to the rear of the rear plate of the remote control. Thread the wires through and connect to the main remote PCB, as shown.
Now connect the LCD screen to the main remote PCB.

Now load the second .ino file onto the remote control Arduino board. This should be the TX file only. We have included the full code at the end of this instruction guide.
Make sure you also install the required libraries too.
With that complete, fully assemble the remote controller.

Stick the second pair of batteries into the remote controller, and this phase is also complete.
You can now power up the remote controller and the robot and search for metal to your heart's content.

As promised here is the code you will need. If you are going to tinker with the code, make sure you make clean backups first (or redownload, of course).
Code for the metal detector (save and upload as Metal_Detector_RX.ino or download from here)
//Arduino Metal Detector Robot
//Receiver Sktech
//Created by DIY Builder
// Contact me https://www.instagram.com/diy.builder/
// Before uploading the sketch you have to install the required libraries
// First go to sketch section >> include library >> manage libaries >> Search RF24 and LiquidCrystal >> Install it >> Done
#include
#include
#include
#define sensor A7
int PWM1 = 6;
int DIR1 = 7;
int PWM2 = 5;
int DIR2 = 4;
int sensorValue = 0;
unsigned long lastReceiveTime = 0;
unsigned long currentTime = 0;
RF24 radio(10,9);
const byte address[6] = "00001";
const byte address1[6] = "00003";
struct Data_Package {
byte x1Value;
byte y1Value;
byte x2Value;
byte y2Value;
byte sValue;
};
Data_Package data;
void setup() {
Serial.begin(9600);
pinMode(DIR1, OUTPUT);
pinMode(DIR2, OUTPUT);
pinMode(sensor, INPUT);
radio.begin();
radio.openReadingPipe(1,address);
radio.openWritingPipe(address1);
radio.setPALevel(RF24_PA_HIGH);
resetData();
}
void loop() {
radio.startListening();
if(radio.available()) {
radio.read(&data, sizeof(Data_Package));
lastReceiveTime = millis();
}
currentTime = millis();
if(currentTime - lastReceiveTime > 1000) {
resetData();
}
Serial.print("j1PotX: ");
Serial.println(data.x1Value);
Serial.print("j1PotY: ");
Serial.println(data.y1Value);
if(data.y1Value > 200 ) {
analogWrite(PWM1, 100);
analogWrite(PWM2, 100);
digitalWrite(DIR1, HIGH);
digitalWrite(DIR2, HIGH);
}else if(data.y1Value < 100) {
analogWrite(PWM1, 100);
analogWrite(PWM2, 100);
digitalWrite(DIR1, LOW);
digitalWrite(DIR2, LOW);
}
else if(data.x1Value > 200 ) {
analogWrite(PWM1, 100);
analogWrite(PWM2, 100);
digitalWrite(DIR1, LOW);
digitalWrite(DIR2, HIGH);
}else if(data.x1Value < 100 ) {
analogWrite(PWM1, 100);
analogWrite(PWM2, 100);
digitalWrite(DIR1, HIGH);
digitalWrite(DIR2, LOW);
}else if(data.y2Value > 200) {
analogWrite(PWM1, 255);
analogWrite(PWM2, 255);
digitalWrite(DIR1, HIGH);
digitalWrite(DIR2, HIGH);
}else if(data.y2Value < 100) {
analogWrite(PWM1, 255);
analogWrite(PWM2, 255);
digitalWrite(DIR1, LOW);
digitalWrite(DIR2, LOW);
}else if(data.x2Value > 200) {
analogWrite(PWM1, 255);
analogWrite(PWM2, 255);
digitalWrite(DIR1, LOW);
digitalWrite(DIR2, HIGH);
}else if(data.x2Value < 100) {
analogWrite(PWM1, 255);
analogWrite(PWM2, 255);
digitalWrite(DIR1, HIGH);
digitalWrite(DIR2, LOW);
}
else {
analogWrite(PWM1, 0);
analogWrite(PWM2, 0);
}
delay(5);
radio.stopListening();
sensorValue = analogRead(sensor);
data.sValue = sensorValue;
Serial.print("sensor");
Serial.println(sensorValue);
radio.write(&data, sizeof(Data_Package));
delay(5);
}
void resetData() {
data.x1Value = 127;
data.y1Value = 127;
data.x2Value = 127;
data.y2Value = 127;
data.sValue = 0;
}
Code for the metal detector (save and upload as Metal_Detector_TX.ino or download from here)
//Arduino Metal Detecting Robot
// Transmitter Sketch
// Created by DIY Builder
// Contact me https://www.instagram.com/diy.builder/
// Before uploading the sketch you have to install the required libraries
// First go to sketch section >> include library >> manage libaries >> Search RF24 and LiquidCrystal >> Install it >> Done
#include
#include
#include
#include
#include
LiquidCrystal_I2C lcd(0x3F, 20, 4);
RF24 radio(10,9);
const byte address[6] = "00001";
const byte address1[6] = "00003";
struct Data_Package {
byte x1Value;
byte y1Value;
byte x2Value;
byte y2Value;
byte sValue;
};
Data_Package data;
void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
radio.begin();
radio.openWritingPipe(address);
radio.openReadingPipe(1, address1);
radio.setPALevel (RF24_PA_HIGH);
}
void loop() {
delay(5);
radio.stopListening();
Serial.print("x1Value");
Serial.println(data.x1Value);
Serial.print("y1Value");
Serial.println(data.y1Value);
Serial.print("x2Value");
Serial.print(data.x2Value);
Serial.print("y2Value");
Serial.print(data.y2Value);
data.y1Value = map(analogRead(A0), 0, 1023, 0, 255);
data.x1Value = map(analogRead(A1), 0, 1023, 0, 255);
data.y2Value = map(analogRead(A2), 0, 1023, 0, 255);
data.x2Value = map(analogRead(A3), 0, 1023, 0, 255);
radio.write(&data, sizeof(Data_Package));
delay(5);
radio.startListening();
if(radio.available()) {
radio.read(&data, sizeof(Data_Package));
int sensor = data.sValue;
Serial.print("button");
Serial.println(sensor);
lcd.setCursor(0,0);
lcd.print("Robot Connected");
if(sensor < 200){
lcd.setCursor(0,1);
lcd.print("Metal Searching ");
}else {
lcd.setCursor(0,1);
lcd.print(" Metal Found ");
}
}else {
lcd.setCursor(0,0);
lcd.print(" Hello World! ");
lcd.setCursor(0,1);
lcd.print("Robot Disconnected");
}
}