How to 3D Print Your Own App-Controlled Mini Tank with FPV Camera

Explore the world in style with this FPV remote controlled mini tank.

If the video player is not working, you can click on this alternative video link.

Who doesn't like tanks? Especially teeny-tiny little RC baby ones?

If you are looking for a project and like the looks of this cute little war machine, then read on to find out how to build one for yourself!

Please note, this build requires an APK app that is only compatible with Android phones. 

diy mini tank
Source: The Wrench/YouTube

Like any project of this nature, you are going to need a few bits and bobs. For this build, you will need:

With all the materials needed in hand, it is time to get on with the build. 

The first step is to 3D print all the parts you need. Either use your own 3D printer or find a supportive friend to help you out. The .stl files can be found above and here

Advertisement

You may want to vary the color of parts to make your tank really stand out, but that is completely up to you.

Once the printing is complete, and you have cleaned up the parts, the next step is to begin assembly of the mini-tank. Grab two of the motors and place them into their respective slots on the base 3D model part.

diy mini tank motors
Source: The Wrench/YouTube

Secure them into place using superglue or a hot glue gun. 

Next, grab the 3D printing parts that will form the main driving sprockets for the tank's tracks -- there will be four in total (two for each track). These sprockets come in two main forms.

The first pair should have a hole in the smaller plate to enable them to be affixed to the motors. The other pair will have no holes. 

Advertisement

Assemble them as shown in the video and the image below. The main gear piece would freely rotate around the endplates, this is critical. 

diy mini tank main sprocket
Source: The Wrench/YouTube

Affix two of the sprockets to each of the motors you previously affixed to the main tank body. Ensure they freely rotate as these will be the main drive wheels for your little baby tank.

diy mini tank wheels
Source: The Wrench/YouTube

With these two wheels in place, grab two of the rubber timing belts and slip onto the main drive wheels. Now grab the other pair of sprockets with no holes in the base. 

Wrap the timing belt tracks around these, and stretch the timing belt so that these sprockets can be superglued on the other end of the tank's main body.

diy mini tank other wheels
Source: The Wrench/YouTube

Allow the glue to cure, and then test the tracks by gently rotating it around in one direction. There should be a little resistance from the motor, but they should freely move. 

Advertisement

With the main mechanical parts assembled, it is time to turn our attention to the electrical gubbins'.

Grab the motor driver and some different colored wires. Solder one end of the wires to the driver board, as shown in the video and the image below. 

diy mini tank driver board
Source: The Wrench/YouTube

Now grab the WiFi module. Match up and solder the wires from the driver board as shown in the video and image below -- take your time here and make sure the wires are correctly paired.

mini doy tank wifi module
Source: The Wrench/YouTube

Now wire up a battery connector to the driver board ready to receive some juice a little later on. Next, grab the FPV camera and solder it to the WiFi board as shown in the video.

Again, make sure you wire the connector and FPV camera to correct places on the boards. 

Advertisement
mini diy tank elecs
Source: The Wrench/YouTube

Now, grab your partially completed tank and solder the motor wires to the motor driver board as shown. 

diy mini tank motor wiring
Source: The Wrench/YouTube

And with that, the main micro-circuitry is complete. Now we need to turn our attention to the tank's software.

Connect the WiFi module to a computer using a USB cable. Upload the NodeMCU_Car code provided here (we have also pasted it at the end of this tutorial for your convenience). 

With the code uploaded, stick the electrical gubbins into the belly of the mini-tank. For best results use adhesive pads. 

diy mini tank elecs
Source: The Wrench/YouTube

Now, grab the closer plate for the tank's main body and seal up the belly of the tank. Ensure the FPV camera remains outside of the tank body (obviously).

mini tank top plate
Source: The Wrench/YouTube

With the top plate in place, grab some more superglue and affix the FPV camera to the "front" of the tank. 

Advertisement
diy mini tank camera
Source: The Wrench/YouTube

Now, grab the battery, connect to the battery connector and affix it to the top of the tank. Again consider using adhesive pads as you may want to replace the battery in the future. 

diy mini tank battery
Source: The Wrench/YouTube

With that, the tank is pretty much complete. Now all you need is a means of controlling the little thing. 

Thankfully for you, the creator made a handy little app for just this purpose. We have included the link to it in the materials list above, but you can also download the .apk file here

Once installed, connect your phone to the tank via WiFi, open the app, and get the mini tank a-rumblin'!

mini diy tank app
Source: The Wrench/YouTube

For added fun, if you managed to get some FPV goggles that are compatible with your camera, you can also wear these to get a fantastic POV as you explore the area around you with your freshly-minted mini DIY tank. 

Advertisement

Enjoy!

As promised, the required code for the tank is as follows: -

#define ENA 14 // Enable/speed motors Right GPIO14(D5)
#define ENB 12 // Enable/speed motors Left GPIO12(D6)
#define IN_1 D1 // L298N in1 motors Right GPIO15(D8)
#define IN_2 D2 // L298N in2 motors Right GPIO13(D7)
#define IN_3 D3 // L298N in3 motors Left GPIO2(D4)
#define IN_4 D4 // L298N in4 motors Left GPIO0(D3)

#include
#include
#include

String command; //String to store app command state.
int speedCar = 800; // 400 - 1023.
int speed_Coeff = 3;

const char* ssid = "NodeMCU Car";
ESP8266WebServer server(80);

void setup() {

pinMode(ENA, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(IN_1, OUTPUT);
pinMode(IN_2, OUTPUT);
pinMode(IN_3, OUTPUT);
pinMode(IN_4, OUTPUT);

Serial.begin(115200);

// Connecting WiFi

WiFi.mode(WIFI_AP);
WiFi.softAP(ssid);

IPAddress myIP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial.println(myIP);

// Starting WEB-server
server.on ( "/", HTTP_handleRoot );
server.onNotFound ( HTTP_handleRoot );
server.begin();
}

void goAhead(){

digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar);
}

void goBack(){

digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
}

void goRight(){

digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar);
}

void goLeft(){

digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
}

void goAheadRight(){

digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar/speed_Coeff);

digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar);
}

void goAheadLeft(){

digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar/speed_Coeff);
}

void goBackRight(){

digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar/speed_Coeff);

digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
}

void goBackLeft(){

digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar/speed_Coeff);
}

void stopRobot(){

digitalWrite(IN_1, LOW);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, LOW);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
}

void loop() {
server.handleClient();

command = server.arg("State");
if (command == "F") goAhead();
else if (command == "B") goBack();
else if (command == "L") goLeft();
else if (command == "R") goRight();
else if (command == "I") goAheadRight();
else if (command == "G") goAheadLeft();
else if (command == "J") goBackRight();
else if (command == "H") goBackLeft();
else if (command == "0") speedCar = 400;
else if (command == "1") speedCar = 470;
else if (command == "2") speedCar = 540;
else if (command == "3") speedCar = 610;
else if (command == "4") speedCar = 680;
else if (command == "5") speedCar = 750;
else if (command == "6") speedCar = 820;
else if (command == "7") speedCar = 890;
else if (command == "8") speedCar = 960;
else if (command == "9") speedCar = 1023;
else if (command == "S") stopRobot();
}

void HTTP_handleRoot(void) {

if( server.hasArg("State") ){
Serial.println(server.arg("State"));
}
server.send ( 200, "text/html", "" );
delay(1);
}

Interesting Engineering is a participant of the Amazon Services LLC Associates Program and various other affiliate programs, and as such there might be affiliate links to the products in this article. By clicking the links and shopping at partner sites, you do not only get the materials you need but also are supporting our website.

Follow Us on

Stay on top of the latest engineering news

Just enter your email and we’ll take care of the rest:

By subscribing, you agree to our Terms of Use and Privacy Policy. You may unsubscribe at any time.