Introduction: 3D Printed DIY Remote Controlled Tank With Operational Gun

About: Fascinated by CAD, 3D printing, mechanics, and electronics. I started my first print in 2020. Since then, I have been failing and learning a lot, and now I'm even more enthusiastic than when I began to dive in…

I started this project to dive into the world of DIY mechanics, electronics, CAD, 3D printing, and programming. I had the idea of a 3D printed, remote controlled vehicle with some additional capabilities besides driving because it's always good to have a specific goal in mind that you want to achieve. This is the third generation of this project, and it finally reached a state at which I dare to call it a success. The challenge of this project was to keep it DIY as much as possible: The whole design was done in Fusion 360, all the mechanical parts were 3D printed at home, and the electronics are selfmade based on ESP32s as cheap microcontrollers, with some off-the-shelf motor drivers, and sensors. The microcontrollers are not only used to control the vehicle but are also employed as a remote control using my own code. Have a look at the end of this instructable for some more video footage of the tank.

This tank has a footprint of 440 mm (length) by 310 mm (width), and it differs from typical remote-controlled vehicles due to its additional functions:

  • Lights: A version of KITT's running light is implemented using RGB LED strips. Headlights and rear lights automatically turn on based on the track movement, and two bright LEDs can be used as additional headlights
  • Clearance from ground: The tank can adjust its main body tilt angle and its clearance from ground (between around 1.5 to 5 cm) using four linear actuators, and it can auto-level its main body when standing still
  • Drive modes: You can choose between fast and slow drive modes, between controlling the tracks using one or two joysticks, and you can fine-tune the controls (speed levels, interpolated or direct transmission of control inputs) within the menu of the remote control
  • Gun: The tank features a fully operational gun with a 16 bullet drum with automatic firing of single bullets (and the remote control displays the number of remaining bullets). But don't worry, the weapon is only for show: It's safe to use with very little kinetic energy in the small plastic bullets
  • Two-directional remote control: The remote control reads and displays the battery status, the connection quality, and the ammunition status of the tank. Also, it includes safety features such as emergency stop on connection loss, main motor stop when stalling is detected, and it prevents further operation when the battery voltage is low

This project can be built using standard equipment for makers (like an FDM 3D printer, a drill, and a soldering iron). I tried to keep everything as simple and reusable as possible: All parts are connected using standard M3 screws and nuts, up to the connection between the single track links. No glue and no post-processing of the printed parts are needed. Nonetheless, it should be noted that this project takes a lot of time for printing, wiring, soldering, calibrating, assembling, and troubleshooting (of course).

I enjoyed the project a lot, and I learned a lot - and I hope you'll do the same! Feel free to build this project, or use parts of it in your own projects or as an inspiration to make it better - because there is always room for improvement! Please leave a comment if something is unclear or if I missed something. I'm happy to help :)

Supplies

I only list very general items here, and things that you can very well procure in larger batches. Specific items are listed in the single steps.

Tools and devices:

  • FDM 3D printer, capable of printing PETG and TPU. I used a Prusa i3 MK3S with Prusament PETG (Jet Black and Jungle Green) and FilaFlex 40 black TPU filament. You need around 2-3 kg of PETG but less than 500 g TPU.
  • Soldering iron, multimeter, and lab power supply
  • Set of hex keys; get a 2.5 mm ball head hex key
  • Pillar drill, metal saw, rasp, thread cutter for M3 screws
  • Wires (0.14 mm² for logic voltage; 0.25 mm² for low-power motors; 2.5 mm² for the track motors; 4 mm² for battery connections)
  • Wire stripper, crimping pliers, and equipment for crimping 2.54 mm Dupont connectors
  • Battery charger for LiPo batteries (3S) and for NiMH batteries (AA)

Bearings:

  • 608 (8x22x7 mm): Get a pack with at least 50 (38 are needed; I chose these 608RS)
  • 605 (5x14x5 mm): Get a pack with 100 (58 are needed; I chose these 605RS)
  • 6802 (15x24x5 mm): 4 pieces are needed (I chose these 6802RS)
  • 683 (3x7x3 mm): 2 pieces are needed (I chose these 683ZZ)
  • LM6UU linear bearings: 16 are needed

Metal parts: There are literally hundreds of screws that you'll need. Look for online stores that sell them in packs with at least 100 pieces (as an example: M3x22 is used for the tracks => there are 92 tracks, so get more than 100 from this size). I opted for metric cylinder head screws that can be driven using a 2.5 mm hex key. A ball head hex key is highly recommended.

  • M3x4, M3x6, M3x8, M3x10, M3x12, M3x16, M3x20, M3x22, M3x25, M3x30, M3x35, M3x40, M3x45, M3x50
  • M3x6 grub screw (8 pieces are required)
  • M3 standard hex nut (you will need more than 500!)
  • M3 threaded insert (I used Ruthex 5.7 mm)
  • Aluminium round bar (6 mm diameter) (several pieces with a length of around 5 to 15 cm required; get 3-4 m in total and cut them accordingly)
  • Compression springs (9 x 35 mm). I used springs from this box (you'll need this box twice)

Money: Unfortunately, although I tried to use cheap components, this project can become quite costly. You can buy many of the required items in larger quantities, meaning that you will be able to use parts of them later on, but if you do not have them at home yet, you still have to invest this money once. As a rough estimate (based on prices of the suppliers here in Germany), I spent around 100 € for screws, nuts, and threaded inserts, another 100 € for bearings and springs, around 100 € for the 10 motors with their motor drivers, 100 € for filament, 100 € for batteries, and somewhere around 200 to 300 € for the electronics and little stuff like LEDs, wires, connectors, flange couplings, lead screws, aluminium round bars, and so on.

Step 1: Main Body

The main body contains the electronics and the batteries of the tank, and it provides the anchor point for the motors and gearboxes and the whole drive train. It is designed as several individual parts that are assembled using M3 screws and nuts. Actually, the whole tank was designed in relatively small components that are connected using screws and nuts. I prefer this design over bigger parts because 1) it minimizes material loss if a print fails, and 2) it harbors the option of adjusting the layout of a single piece of a large assembly without having to reprint everything. The connections that are difficult to reach are designed with threaded inserts instead of hexnuts to prevent nuts from falling out of their pockets.

The electronics compartment within the main body includes mounting points for holders on which the electronic components are mounted. The electronics with their holders are installed in step 4. The battery compartment is located at the bottom of the tank to lower the center of gravity Also, it is specifically designed for the 3S LiPo batteries listed below (closing the battery cover fixes the battery packs within the tank). The dimensions need to be adjusted if you want to use battery packs of a different size.

The CAD files for printing are attached to this step. All parts can be printed from PETG. The top frame and the side covers are needed twice. Required extra parts for the main body:

  • 34x M3x12 screw
  • 8x M3x20 screw
  • 4x M3x40 screw
  • 46x M3 hexnut
  • 28x M3 threaded insert
  • 4x 608 bearing (8x22x7 mm)
  • 2x 5 Ah 3S1P LiPo battery (size: 160x45x23 mm)

IMPORTANT: The two batteries are internally wired in parallel to double the capacity. Thus, you have to charge them to the exact same voltage before putting them into the tank - otherwise, you can destroy them!

Step 2: Front and Rear With Internal Gear Boxes

The front and rear of the tank contain the main parts of the motor train: The two big 775 brushed DC motors (which are a bit oversized, to be honest) and a gearbox that comes with a 9:1 gear reduction. The gears were designed with two tricks to enhance their lifetime: Firstly, the gears are herringbone gears (a type of double-helical gears), which are ideal for being manufactured by 3D printing because they can be printed as easily as classical spur gears but they run a bit more silent and, more importantly, they can withstand a larger torque. Secondly, the gears are designed with a hollow core. The stiffness of the gears is increased by pushing aluminium bars with 6 mm diameter through the center of the gears. This shaft not only holds the gears in place within the gearbox but it also minimizes bending under load (which is one of the main reasons for failing of 3D printed gears: bending causes the gear to break because of the mechanically weak line-to-line connection of FDM prints).

The motors are actively cooled by two computer fans (40x40x10 mm, running on 5 V), and the front assembly includes two high-power LEDs as optional headlights. Front and rear include RGB LED strips with 11 LEDs per assembly to display KITT's famous running light. Also, the RGB LED strips are used as headlights and rear lights when the tank is driving. A photoelectric switch is included in the front and rear compartment. It measures the speed of the drive train, which is internally used as a safety feature: Motion is automatically stopped when the system detects motor stalling. First, I tried to play around with a speed control based on a feedback loop with these sensors (maybe with a PID control), but I realized that I did not get enough counts per second from the sensors to make proper use of such a control. Also, the motors are so ridiculously strong that the speed literally always matches the PWM duty cycle provided to the motor drivers, no matter if you drive uphill or not, so I did not continue with this option.

The front assembly includes a motor driver that I had to put there because I ran out of space in the electronics compartment. This motor driver is responsible for the main motors of the weapon (acceleration wheel motors). Since this driver only needs to drive them in one direction, you can wire the DIR input of both channels to ground. Both PWM inputs are merged into one wire that is routed to the µC because the motors should always spin at the same speed. Thus, one pin of the µC is sufficient to run the two motors of the weapon.

In the rear assembly, the supplementary motors of the weapon (responsible for shooting and reloading) are controlled by a very simple DIY motor driver. For this function, I first tried to use another (refer to the electronics section to see why "another") L293D dual-channel motor driver but that did not work out as expected: The supplementary motors needed to not move at all while powering up, but the L293D driver caused motor twitching during startup until the µC was actively controlling its pins. I circumvented this issue by building a DIY motor driver with pulldown resistors, and this solution works decently. For each of the two motors, the DIY driver uses an IRLZ 44N logic level transistor (this transistor works well with the 3.3 V of the ESP32) with a 22 kOhm pulldown resistor and a 1 kOhm gate resistor, and a 1N 5819 Schottky diode as a free-wheeling diode. A 100 µF capacitor is added to the driver to stabilize the motor supply voltage.

For the assembly of front and rear, it is important to start with the gearboxes. Take the outer and inner frame of the gearboxes and add the hexnuts and the ball bearings. Secure the hexnuts using some duct tape (to prevent that they fall out of their pockets). Push the three axle spacers into the bearings and assemble the gears by pushing the aluminium axles through their center holes. Install the long 34 teeth gear in the inner gearbox frame and push the sensor wheel onto the aluminium bar. Fix the 34 teeth gear on its aluminium axle using the M3 grub screws. Then, you can install the DC motor using two M4x10 screws. Prepare the motor gear by reinforcing it with the threaded insert and the internal screw, and then mount it on the flange coupling. Push the flange coupling onto the motor shaft and install the 36 teeth to 17 teeth gear between the motor gear and the 34 teeth gear. Add the outer gearbox frame and install the assembly at the main body using four M3x50 screws. Add grease to the gears and secure the flange coupling on the motor shaft using the grub screws that were delivered with the couplings. I replaced the grub screws of the flange couplings with M3x4 cylinder head screws because they can be tightened with more torque (the grub screws had the tendency to loosen over time). Also, you can install the inner and outer frame of the idler side using four M3x50 screws.

Next, you can install the photoelectric switch on the gearbox bottom cover using two M3x12 screws and connect the gearbox bottom cover with the idler bottom cover using two M3x10 screws. Attach the cover at the gearbox and idler frames using eight M3x6 screws. Align the sensor wheel to be centered within the photoelectric switch and secure it using two M3 grub screws. Cut the RGB LED strip into two pieces with 11 LEDs each and solder them in series (use sufficiently long wires to lead them through the body of the tank!). Push them into the groove of the two center covers and install the covers at bottom covers with two M3x10 screws. Be careful not to push the nexnuts into the body of the tank. Install two side covers in the front and the other two in the rear with four M3x12 screws per side cover.

Install the fans in the top covers with four fan screws each. Assemble the high-power LED headlights by screwing the LED into its socket and fitting the socket into the headlight barrel. Secure it in place with the headlight back cover using an M3x8 screw and route the wires of the LED through the bottom opening of the back cover and the headlight barrel (this is done to avoid them from getting caught in the sensor wheel). Install the headlights in the front top cover plates. Install the front motor driver after adding all wire connections (refer to the attached image) and close the front of the tank using eight M3x6 screws from top and two M3x12 screws from the front.

Finally, you can install the power switch at the back frame (idler side) and also attach the DIY motor driver at one of the mounting points at the inner back frame (idler side) after connecting all wires (see the attached image). You can leave the back cover open since you will have to access this side later on to connect the battery connectors with the electronics of the tank.

The CAD files for printing are attached to this step. All parts can be printed from PETG. The assembly is required twice; all parts besides the outer frame (with and without switch), the top cover (with and without headlight cutout), and the central cover (with and without headlight cutout) are equal for the front and the rear of the tank. The parts for the headlights (left and right) and the motor driver holder are needed once. Required extra parts for both assemblies:

  • 2x 775 brushed DC motor. The motors I bought are specified with 10.000 rpm at 12 V and consume around 1.1 A at 12 V without any load (estimated stall current: >60 A). I used 2.5 mm² wires to connect these with their motor driver
  • 6x 608 bearing (8x22x7 mm)
  • 2x 6802 bearing (15x24x5 mm)
  • 2x flange coupling with 5 mm inner diameter. I had issues with the pre-installed M3 grub screws (they loosened over time) and replaced them by M3x4 screws.
  • 2x aluminium roundbar (6 mm diameter, 116 mm length)
  • 2x aluminium round bar (6 mm diameter, 49 mm length)
  • 2x 40x40x10 mm DC fan (5 V) with four fan screws per fan
  • 2x photoelectric sensor
  • 1x WS2812 RGB LED strip (5 V, 100 LED/m). 11 LEDs are needed per assembly, so 22 in total
  • 2x 2 W LED with 2x E10 bulb socket. Note: I had these LEDs at hand, which are designed to work at 6 V. Thus, I needed another DC-DC converter in the electronics compartment. If you can find LEDs operating at 5 V, then go for those
  • 1x Cytron MDD3A dual-channel DC motor driver. 0.25 mm² wires are used to connect to power and the motors; 0.14 mm² are used for logic connections
  • 1x selfmade dual-channel DC motor driver (2x IRLZ 44N Mosfet, 1x 63V/100 µF capacitor, 2x 1N 5819 Schottky diode, 2x 22 kOhm pulldown resistor, 2x 1 kOhm gate resistor, 2.54 mm pitch pins, 1x breadboard). 0.25 mm² wires are used to connect to power and the motors; 0.14 mm² are used for logic connections. The circuit sketch shows one channel of this driver: you have to duplicate it
  • 1x mechanical on/off switch (Marquardt 01801.2106-01; 19.4 x 13 mm cutout dimensions)
  • 4x M4x10 screws
  • 8x M3x6 grub screws
  • 32x M3x6 screws
  • 14x M3x8 screw
  • 10x M3x10 screw
  • 32x M3x12 screw
  • 2x M3x22 screw
  • 8x M3x50 screw
  • 96x M3 hexnut
  • 14x M3 threaded insert

Attachments

Step 3: Linear Actuator

The linear actuators move the chain wheel units up and down, which provides the tank with the capability to adjust its clearance from ground and its tilt angle. The actuators are a part of the main body of the tank, and they need to be calibrated individually in order be fully operational. They provide a direct readout of their current position using a potentiometer, and due to the poor linearity of the analog digital converters of the ESP32, the analog readout over the full height range first needs to be recorded once for every actuator. This data is used to write a correction function that is applied on the raw readings of every actuator. It is important to assemble and add the actuators prior to installing the main electronics (makes wiring easier), and you'll have to write your own piece of code to test them and run the calibration. Alternatively, you could try external ADCs (like the ADS1115) to improve the data quality of the analog signals. However, you will still have to specify the upper and lower limits for each actuator as there are no limit switches included in the design.

There is a left and right version of this actuator. You will need each of them twice, and a pair of left and right goes on each side of the tank. They are installed in the main body of the tank (the lower frame and the motor holder are part of the main body of the tank). It is important to use lead screws with the described thread pitch for the actuators: The actuators are supposed to be self-locking. If they were not, the motors would need to be constantly powered to keep the tank body in its position - which is neither efficient nor good for the lifetime of these motors. The trapezoidal nuts have some backlash. You'll have to live with this quality in this price class. Equally, the aluminium bars that are used as linear axes are not very stiff. However, steel would add more weight and is more diffiicult to machine. Hence, I opted for aluminium bars and they work just fine.

The lead screws are "squeezed" between their upper and lower bearings. Since they have to be cut manually, it is recommended to cut them not too short but rather try to fit them and grind them further down in case the tension is too high. Alternatively, you can change the design of the spacer between the lower bearing and the lead screw to assemble it with the ideal tension. The length of the aluminium bars is not critical (they should not be longer than specified, but if they are 1-2 mm shorter, they still do the job).

For the assembly, it is important to have the main body of the tank already finished. The carrier of the linear actuator is assembled by pushing the LM6UU linear bearings into their slots, and screwing the upper parts of the carrier into the main lower part of the carrier. Install the tooth rack on one side of the carrier (left version: rack is on the right side; right version: rack is on the left side). Then, the trapezoidal nut with the lead screw can be fixed and the two aluminium round bars are pushed into the linear bearings. Add the N20 motors into their holders in the main body of the tank and push the 16-teeth spur gear onto their shafts. Grind one side of the lead screw to form a D-shape and push the 24 teeth gear onto it. Push this assembly together with the lead screw spacer into its position on the main body of the tank. Add the upper frame after installing the 608 and 605 bearings by carefully arranging all parts to fit their into their position, and tighten the assembly by using the three screws in the upper frame.

Then, you can assemble the pinion holder. You need to prepare a potentiometer with 6 mm shaft (cut its knob, and grind it to form a D-shape), solder the three wires to the connectors, and install it in the pinion holder. Push the pinion gear onto the shaft of the potentiometer. Place the pinion holder into its position at the tank's main body, and pull the wires into the electronics compartment of the main body. Fix the pinion holder by inserting two M3 hexnuts into the groove at its bottom, and add screws from the bottom of the tank's main body. Push the pinion holder laterally until you feel the resistance from the rack: Make sure that the backlash is minimal, and then tighten the screws from the bottom to fix the pinion holder in this position.

The CAD files for printing are attached to this step. All parts besides the rack and the upper frame can be used for the left and the right version of the actuator. All parts can be printed from PETG. Required extra parts per linear actuator (four are needed in total):

  • 1x lead screw with trapezoidal nut: 8 mm diameter, 2 mm thread pitch, 96 mm length. Do not use a standard lead screw like in the z-axis of FDM 3D printers: They have a larger thread pitch, which means they are not sufficiently selflocking (works for the extruder of a printer, but this tank has more weight). The lead screw in the link has a trapezoidal nut made from brass - if possible, choose brass instead of plastic for increased resistance to wear.
  • 1x rotary potentiometer (linear, 10 kOhm) with 6 mm shaft. I chose this model: Omeg PC20BU
  • 1x N20 geared motor. Version: 12 V, 300 rpm. Do not go for a faster version as the torque may then be too low to reliably move the actuator.
  • 2x aluminium round bar (6 mm diameter, 112 mm length)
  • 1x 608 bearing (8x22x7 mm)
  • 1x 605 bearing (5x14x5 mm)
  • 1x M3x6 screw
  • 2x M3x12 screw
  • 4x M3x20 screw
  • 3x M3x25 screw
  • 11x M3 hexnut

Step 4: Electronics

First of all, you need to be warned that I'm not an electrician. However, I had to (and wanted to) customize the electronics of the tank to a certain extent compared to the options provided by typical RC transmitters and receivers to implement the functions that the tank should have. I am very certain that the solutions that I developed are far from ideal, but so far they work: The tank is controlled by two ESP32 microcontrollers, of which one ("primary") acts as a receiver for the remote control, and the other ("secondary") receives commands from the primary controller. This concept enables the primary controller to control driving, lights, the weapon, read sensor inputs, and communicate bidirectionally with the ESP32 in the remote control. The secondary controller is responsible for the height and tilt adjustment, including an automatic tilt compensation using an MPU6050 accelerometer. Special thanks go to StudioPieters for their overview and description of the pins and options of the ESP32, which was a great help in identifying which pin can be used for which input or output.

I used a CNC mill to manufacture single-layer PCBs that carry many of these components. Note that this is not needed; a breadboard can be used as well. However, the holders for the electronics are designed to match the mounting holes of these custom PCBs. You need to modify the holders for varying sizes of customized breadboards. Also, I had to add some modifications to the electronics on the fly after milling and soldering everything onto the PCB. For example, I realized that the outputs of the microcontroller that connect to the motor driver for the track motors require an external pulldown resistor to prevent motor twitching during startup (before the pin is actively set to a logical low by the sketch that is running on the controller). Long story short: I didn't share these files because now I would design them differently anyway. However, I provide sketches of the circuits of the PCBs so that you can build your own breadboards/PCBs.

I did not include the wiring toward the logic level converters and the external motor drivers in these circuit sketches to keep them simple. The Cytron MDD20A can be operated directly with inputs from the ESP32 since 3.3 V are sufficient for this driver to read a logical high. However, as mentioned, make sure to add a pulldown resistor (e.g., 10 kOhm) to its PWM inputs to prevent the tank from moving involuntarily during startup. The same holds true for the Cytron MDD3A for the weapon. These pulldown resistors are already included in the DIY motor drivers for the supplementary weapon motors, meaning that you can directly wire those. The motor drivers for the linear actuators are connected using logic level converters (3.3 V -> 5 V) because I noticed issues when trying to operate the L293D drivers at 3.3 V. I changed the wiring to these L293D drivers compared to their standard layout: Their enable pins are directly connected to 5 V, and the two input channels per motor are each connected to a PWM output of the secondary ESP32. Thus, only two µC pins are needed per channel of an L293D. You do not need pulldown resistors on those.

An important safety and control feature that I wanted to use in this tank is a proper on/off switch. RC cars can be designed more simple by directly plugging the battery connectors into the power connectors of the motor drivers without a mechanical switch between them. The reason why one would use this approach is simple: The motors can draw large currents, which can easily exceed 50 A, and mechanical switches that are rated for such a high current are also huge and therefore unsuited for RC models. Nonetheless, I was not happy with the "plug and play" version. I wanted to safely switch the whole device on and off with a single switch, without having to (un)plug something. Thus, I opted for a "big" transistor as a main switch that can withstand high currents. This transistor, in turn, is switched on and off using a classical mechanical switch. Further, the PCB that holds this transistor and the connections between battery and motor drivers includes a 60 A fuse, which is added to protect the battery in case of issues somewhere in the electronics.

Please make sure to use appropriate wire diameters for the components. I did not perform current measurements for the final, operating tank, but from the pre-tests with my lab power supply, I can tell that the big 775 motors have an idle power consumption (including the gearboxes and the tracks) of about 3 A per motor at full speed. Thus, you can estimate around 5 to 10 A per motor when driving fast. I used 2.5 mm² flexible wires to connect the main motors with their motor driver. The connection between the batteries and the main power circuit is established with 4 mm² flexible wires. The smaller motors (weapon, actuators) are connected with 0.25 mm² wires. Logic connections are done with 0.14 mm² wires.

When programming the tank, calibrating the linear actuators, or doing anything without having checked before that the code executes as expected: Make sure to place the tank in a way that it cannot move. Put a box below the chassis so that the tracks do not have any contact to the floor, or remove the tracks for programming. This measure is mandatory to prevent damage to the device and possible injuires to the operator! Also, you have to check the directions for all actuators: The rotation direction of brushed DC motors depends on how you wire them (swapping their wires changes the direction), meaning that you will very likely have to adjust either the code or the wiring to let the actuators move in the desired direction. I had the battery circuits of the devices on during programming to prevent the components from drawing too much current from the USB cable. Regarding the code, I want to express thanks to DroneBot Workshop, Last Minute Engineers, and Adafruit for their really helpful content that I partially used as a basis and partially used as an inspiration for the code on the ESP32s in the tank and the remote control.

Below, you can find a list of all the electronics components that have to be put into the electronics compartment of the tank. Also, I added the sketches for the two ESP32s (I used Arduino IDE to program them; hence, the sketches are provided as .ino files), the pin list for the µCs, and the CAD files for the electronics carriers. They can be printed from PETG. The spacers for the component PCB and the motor driver are needed three and four times, respectively, to provide enough clearance between the carrier and the PCB.

  • 2x ESP32 development board (38 pin version). It is recommended to get some spare ones and check the WiFi signal quality before putting them into the tank. I noticed that it differs a lot between the boards, with some of them being almost "deaf". Use a "good one" as the primary µC (secondary doesn't matter since it does not need WiFi)
  • Main motor driver: Cytron MDD20A. This dual channel brushed DC motor driver can easily handle the two 775 motors (it is rated for up to 20 A continuous current per channel)
  • 2x L293D dual channel brushed motor drivers to control the motors of the linear actuators
  • 3x LM2596S DC-DC buck converter (step down converter). Adjust one for 6 V, one for 5 V, and one for 3.3 V
  • 2x bidirectional four channel logic level converter (3.3 V <-> 5 V)
  • Main power switch for the tank: 1x IRFP7430PF MOSFET with heat sink and resistors (2x 22 kOhm, 1x 47 kOhm)
  • 1x MPU-6050 accelerometer
  • Small stuff: resistors for a voltage divider (1x 22 kOhm, 1x 100 kOhm), capacitors (2x 10 µF, 1x 100 µF; rated for >25 V), a diode (1N 5819), 2 Mosfets (IRLZ 44N, each with a 1 kOhm gate resistor and a 22 kOhm pulldown resistor), and pulldown resistors for the Cytron motor driver pins (3x 10 kOhm)
  • Screws, nuts & threaded inserts: 8x M3x6; 10x M3x8; 11x M3x10; 14x M3x12; 26x M3 hexnut; 9x M3 threaded insert (these sizes and numbers are valid for the PCBs and holders that I designed and used)

Step 5: Chain Wheel Unit

The chain wheel units carry the weight of the tank, and they are connected to the linear actuators that enable the adjustment of the tilt angle of the main body and also its clearance from ground. They feature two chain wheels at their bottom, which are interconnected but can rotate some degrees to increase the flexibility of the tracks. The upper side of each chain wheel unit harbors one chain wheel, which is used as a tensioner for the tracks. You will need four chain wheel units in total.

First, you have to assemble all the chain wheels (608 bearings with outer and inner sides, interconnected using the hubs of the lower chain wheel unit and the upper chain tensioner. Then, the chain wheel carrier is connected with the hubs of the lower chain wheels, and the whole setup is fixed at the suspension bracket. Prepare the aluminium bars and push them through the body connector. You can already fix the outer (shorter) aluminium bars, but do not tighten the screws for the inner (longer) aluminium bars yet. Add the compression springs onto the aluminium bars and place the chain wheels on the aluminium bars. Now, you have to align the inner aluminium bars to set the maximum travel of the suspension: Add the spring endstop onto the inner aluminium bars and position them so that the suspension has an extended length of 20 mm (maximum). Then, you can tighten the inner aluminium bars and the chain wheel unit is ready. Please note that you should only place one spring endstop at the chain tensioner (upper chain wheel) to avoid the aluminium bar from touching the chain (see image with mounted chain wheel units).

The CAD files for printing are attached to this step. All parts can be printed from PETG. Required extra parts per chain wheel unit (four units are needed in total):

  • 2x aluminium round bar (6 mm diameter, 63 mm length)
  • 2x aluminium round bar (6 mm diameter, 102 mm length), with M3 inner threads at their bottom and top sides
  • 6x compression spring (9 mm diameter, 35 mm length)
  • 6x 608 bearing (8x22x7 mm)
  • 2x 605 bearing (5x14x5 mm)
  • 18x M3x4 screw
  • 3x M3x6 screw
  • 8x M3x12 screw
  • 2x M3x16 screw
  • 1x M3x30 screw
  • 3x M3x35 screw
  • 4x M3x40 screw
  • 36 M3 hexnuts

Step 6: Chain Sprocket With Epicyclic Gearbox

The sprockets that drive the tracks are designed as epicyclic gearboxes. They feature a detachable cover because it's really nice to see the gearbox do its job but the gears degrade very quickly if it is operated openly: The printed gears do not like dust and tiny stones at all. Thus, the gearbox can be closed to increase its lifetime. This gearbox includes a 4:1 gear reduction ratio (together with the inner gearbox, the total transmission ratio between motor and sprocket is 36:1). It is driven by the sun gear that protrudes from the main body of the tank. The planets of the gearbox are fixed, and the hollow gear acts as the chain sprocket with its 12 teeth. Every gear of the epicyclic gearbox was designed with a module of 1, and the number of teeth per gear (sun: 12; planets: 18; hollow: 48) was chosen to enable a 120° angle between the planets.

The hollow gear is centered on the planet carrier using three ball bearings that run in slots within the hollow gear, and the screws that run through the planets attach the sprockets to the main body of the tank. The whole component is designed to be attachable after the main body has been completed, and therefore also enables a simple replacement of single gears in case of wear and tear.

First, the hollow gear needs to be assembled. Print the outer and the inner gear ring and the central tooth ring. They can be screwed together using four M3x25 screws and four M3 hexnuts. Further, the threaded inserts for the outer and inner caps need to be added to the gear rings using a soldering iron. Then, the inner cap can be screwed onto the inner gear ring using four M3x8 screws.

Next, the planet carrier has to be prepared. Push three M3x35 screws through the holes that are attached to the longer shafts of the outer part of the planet carrier, and push one 605 ball bearing (5x14x5 mm) on each screw together with the little printed bearing spacers (two per bearing, therefore six in total). Then, you can fit the outer part of the planet carrier into its final position from the outside of the sprocket with the 605 bearings within the slot of the hollow gear. Prepare the three planet gears by pushing one ball bearing per side into the gears, and don't forget their internal spacer (the friction will increase a lot if this spacer is not added). Add three M3x50 screws to the outer part of the planet carrier, and push the planets onto the screws (the side with the ball bearing being deeper inside the gear needs to face the outside of the gearbox).

In the next step, you can push the inner part of the planet carrier into place and fix it by adding three M3 hexnuts and tightening the M3x35 screws. Don't forget to add some grease to the gears before pushing the sprockets onto the sun gears that protrude from the main body of the tank, and tighten the gearbox to the body using the three M3x50 screws. Do not overtighten these screws as that will increase the friction significantly. Now it's up to you whether you want to seal the gearbox using the outer cap or not. In case you want, you can do that equally to the inner cap using four M3x8 screws.

You need to prepare this sprocket four times. Only two of them are actively driven by a motor (one per side), but for the sake of symmetry, the front and back are designed identical on each side of the tank. Also, you can consider that as a measure to create redundancy: If gears on the driven sprocket fail, this sprocket can be readily exchanged with the idler sprocket. The CAD files for printing are attached to this step. All parts can be printed from PETG. Required extra parts per sprocket:

  • 9x 605 ball bearing (5x14x5 mm)
  • 8x M3x8 screw
  • 4x M3x25 screw
  • 3x M3x35 screw
  • 3x M3x50 screw
  • 8x M3 threaded insert
  • 7x M3 hexnut

Step 7: Drive Tracks

The tracks are 3D printed from PETG and feature a tread made from TPU to improve traction on smooth surfaces. The sprocket grips the tracks in their central indentation, and the two grooves at the edges are used to center the tracks on the chain wheels.

Each link consists of three main printed parts. The tracks are 40 mm in width and a single link has a length of 20 mm. They are assembled using one M3 hexnut and one M3x22 cylinder head screw per link. The joint is formed by the printed pin and the next track (plastic gliding on plastic) with the screw fixing the printed pin. I chose this design to prevent the screw from unscrewing itself and so far it works well. Please note that an overtightening of the screw will increase the friction of the joints between the chain links significantly.

The treads are fitted into grooves within the main parts of the tracks, which enables them to be easily replaced if needed but still prevent them from being ripped off when high torque is acting on the track. The treads need to be printed as two separate pieces per link to enable a simple (dis)assembly of the final tracks. You can adjust the height of the treads depending on the use case. For instance, reducing the tread height decreases the forces acting on the tracks when operating the tank on carpet. I did not attempt serious offroad applications of the tank because it is not sealed against dust and dirt.

The tank requires 47 tracks per side; thus, you need 92 tracks in total, which also means that you will need 92 screws and nuts. I printed the tracks with their bottom side facing upward, which did work out well without requiring any support. Printing a single chain link takes a bit less than 1 h, so be aware that printing the full tracks will take quite some time. The CAD files for printing are attached to this step. The treads need to be printed from TPU. All other parts can be printed from PETG. Required extra parts per chain link of the track:

  • 1x M3x22 screw
  • 1x M3 hexnut

Step 8: Weapon

The weapon of the tank is designed on the top cover of the tank. If you prefer to build a simple tracked vehicle without the capability of shooting, you can skip this part and only print a plain top cover (the CAD file for that is provided below). This gun is not powerful; it can shoot a distance of about 3-4 m, and stopping a bullet with your hand does not hurt. It is meant as a proof of concept. The main challenge was to design a fully 3D printed shooting mechanism that would actually work. The weapon is fixed on the tank and it cannot be rotated or tilted (because I ran out of pins of the µC...). However, you can slightly change the weapon tilt angle (default: 5°) by tilting the main body of the tank.

The gun uses 3D printed bullets that are accelerated between two spinning wheels. This design was inspired by Markus Purtz's Nerf dart launcher, although I deviated from that design regarding the bullets and the loading mechanism. I wanted to use printed bullets, and neither did I want to rely on gravity to reload the gun, nor did I trust springs due to the somewhat unpredictable friction of 3D printed parts. Hence, I designed and built a mechanism that actively pushes single bullets (bullet by bullet) between the acceleration wheels. The concept is kind of based on the drum of a revolver. The drum has slots for eight bullets, but I wanted to have a larger capacity than only eight shots. Therefore, my design features a second row of bullets within the drum, which results in total capacity of 16 shots.

Shooting of the gun is done fully automatically: Upon "pulling the trigger" at the remote control, a conveyor belt pushes a bullet between the acceleration wheels so that it is fired. The system recognizes that a shot has been fired and forwards this information to the remote control, which displays the remaining ammunition. When having fired both rows of a slot position of the drum, the drum rotates by an increment so that the next slot with its two bullets is engaged. With this algorithm, the tank can shoot all its 16 bullets without any manual interference (unless there is an issue causing the weapon to become jammed). Both the conveyor belt and the drum are moved by little N20 brushed DC motors with included gearboxes, and sensors are used to detect the position of drum and belt. The acceleration wheels are powered by another pair of brushed DC motors.

Reloading an empty clip of the gun has to be done manually (pushing a bullet into the drum and rotating the belt pulley with a hex key), and after reloading the drum with bullets, the remote control is used to update the tank with the information that its ammunition is full again. The remaining ammunition count is stored within the flash memory of the µC so that switching the tank off and on with partially emptied clip is possible: The currently remaining number of bullets will be retrieved from the flash memory upon switching on the tank.

I tried to design, build and program the weapon mechanism as sturdy as possible, but due to gearbox backlash, inertia of belt and drum, and the tolerances of the printed parts, there is the risk of a bullet becoming stuck somewhere within the mechanism, which may cause a motor to stall. Therefore, the code for the weapon control includes a safety feature: If the code snippet for firing is not completed within 3 s, all weapon motors are automatically switched off to prevent damage due to overheating of stalled motors, and the weapon error is displayed by the remote control. If the weapon is jammed, it can be reset by the remote control using the reloading option. Note that the bullet count will then be reset to full since jamming means that the actual number of bullets is unknown to the system (it does not know where the jamming occurred, and if it occurred prior or post shooting the bullet).

The weapon is built by first assembling the acceleration wheel motors with their clamps. Mount them onto the base plate, and install the belt with the idler at the clamp. Then, you can prepare the drum with its insert: Make sure to fix the drum insert tightly on the aluminium round bar and put it between the two drum parts before securing them using the screws. Assemble the drum frames with the 605 bearings and their inserts and attach the drum frame around the drum using their front and back covers. Make sure that the drum frame spacers (the round bars) match the distance between the drum frames to minimize friction (depending on the tolerances of your printed parts, you can increase their size, or grind a bit off to fit them between the drum frame parts. Attach the drum with its frame on the base plate and push the belt through the drum.

Next, you can add the limit switch and the drum motor after assembling them with their mounting parts. Use the slots in the base plate to align them appropriately: there should be as little backlash as possible between the drum and the spur gear of the drum motor (but not too much friction either), and the limit switch should be triggered clearly (audible "clicking") by the protruding pins of the drum when rotating it. Finally, you can assemble the belt pulley axle as shown in the images, push the belt onto the pulley, and secure the assembly on top of the back of the base plate. Use the slots in the base plate to adjust the tension of the belt. If the belt tension is too low, the belt pulley will skip without moving the belt. You will notice some bending of the base plate when increasing the tension of the belt. This issue is resolved once the base plate is mounted on the main body of the tank.

The CAD files for printing are attached to this step. The belt needs to be printed from TPU. All other parts can be printed from PETG. Parts that need to be printed twice: acceleration wheel, belt idler, drum frame insert (left), drum frame insert (right), drum frame left, drum frame right. Parts that need to be printed four times: drum back spacer, motor spacer. If you do not want to add the weapon, you need the top cover (no weapon) and text insert (no weapon) parts (they are not needed when opting for the gun). Required extra parts:

  • Weapon motors: 2x 315 brushed DC motor. These motors actually come with a datasheet. According to the datasheet, they should run at around 10.000 rpm at 12 V. At this voltage, they draw typically less than 0.5 A.
  • Weapon support motors: 2x N20 geared motor (12 V and 500 rpm). Motors with 300 rpm like for the actuators should also work, but I only had the 500 rpm versions at hands when building the weapon.
  • 1x photoelectric sensor (sensor for the belt)
  • 1x limit switch (sensor for the drum)
  • 10x 605 bearing (5x14x5 mm)
  • 2x 683 bearing (3x7x3 mm)
  • 1x aluminium round bar (6 mm diameter, 48 mm length)
  • 2x M3x6 screw
  • 16x M3x8 screw
  • 11x M3x10 screw
  • 11x M3x12 screw
  • 14x M3x16 screw
  • 4x M3x20 screw
  • 1x M3x22 screw
  • 2x M3x25 screw
  • 2x M3x30 screw
  • 2x M3x35 screw
  • 4x M3x45 screw
  • 1x M3x50 screw
  • 47x M3 hexnut
  • 12x M3 threaded insert

Attachments

Step 9: Remote Control

The remote control is used to control the tank wirelessly via WiFi. I opted for a custom solution to be able to get feedback from the tank, and to customize the possible controls and settings. Thus, the remote control is based on an ESP32 that connects to the tank using ESP-Now, it contains an LCD display, and the input and control options can be adjusted within a little selection menu. Similarly to the electronics of the tank, I used a CNC-milled single-layer PCB, but it can be built by a simple breadboard as well.

Six 1.2 V NiMH batteries are used to power the remote control, which results in a sufficiently high voltage to power the buck converters that generate 5 V DC and 3.3 V DC for the different components of the remote control. The LCD display uses an I2C interface and requires 5 V logic voltage. Hence, a logic level converter is used between the µC and the display. The switches are connected to ground and a digital pin of the µC and therefore use the internal pull-up resistors of the ESP32. The rest of the electronic components runs on the same logic level voltage as the ESP32 (3.3 V). A voltage divider is included that enables a readout of the battery voltage (8.2 V equals fully charged batteries, and 6.8 V was set as a threshold for the low battery error).

The remote control uses a longer code than both ESP32s of the tank, which is due to all the code snippets required for the different pages of the LCD display. The remote control shows the status of the tank as well as the settings of the remote control (refer to the attached photographs for more detailed information on the display). Using the rotary encoder, the menu of the remote control can be entered, which allows the user to adjust, e.g., speed levels for slow and fast modes, or to switch between two-joystick control or single-joystick control for driving. The different settings are stored in the flash memory of the ESP32, which means that the settings are permanently saved and are restored upon switching the remote control off and on.

The case of the remote control consists of two main parts, bottom and top. The different electronic components are attached either at the top or at the bottom part. Thus, you need to ensure that the wire connections are sufficiently long to attach everything while the remote control is still open. When closing the case, you do still have access to the ESP32 for programming by removing the cover in the front. Equally, the batteries can be replaced by removing the battery cover at the bottom.

The CAD files for printing are attached to this step. All parts can be printed from PETG. Also, the pin list for the ESP32 and its sketch (as a .ino file) are attached. Required extra parts:

  • 6x rechargeable NiMH AA batteries with a battery holder to connect them in series (voltage: 8.2 V (fully charged) to 6.8 V (my safety threshold for "empty")
  • 1x ESP32 development board (38 pin version)
  • 2x LM2596S DC-DC buck converter (step down converter)
  • 1x bidirectional four channel logic level converter (3.3 V <-> 5 V)
  • 1x LCD display (20x4, I2C connection)
  • 1x rotary encoder
  • 1x potentiometer (10 kOhm, linear, 6 mm shaft; Omeg PC20BU)
  • 2x switch (Marquardt 01821.6101-00), 1x mechanical power switch (Marquardt 01801.2106-01)
  • Capacitor for voltage stabilization (10 µF) and resistors for voltage divider: 1x 22 kOhm, 1x 47 kOhm
  • 2x M3x4 screw
  • 2x M3x6 screw
  • 10x M3x10 screw
  • 4x M3x20 screw
  • 2x M3x25 screw
  • 8x M3x35 screw
  • 6x M3x40 screw
  • 30x M3 hexnut
  • 4x M3 threaded insert

Step 10: You're Done! Time to Let the Tank Run

The videos show the tank in operation. The bidirectional communication between the remote control and the tank means that both can show whether there is a stable connection or not. The tank blinks its RGB LEDs in red if the remote control is not switched on or if the signal is lost. This safety feature does not only work during startup, but also during operation: The tank stops driving when the connection to the remote control is lost. The remote control indicates the status of the tank (battery voltage, ammunition) and also indicates when the connection is lost.

Further, the videos show the height and tilt adjustments of the tank, and how the automatic tilt compensation works. The suspension of the tank works quite well, despite the fact that it only consists of springs but not of hydraulic or pneumatic shock absorbers. To this end, the interpolated drive mode helps a lot: It dampens abrupt speed changes, which avoids excessive bouncing forth and back upon fast accelerations and breaking. Additionally, the fast drive mode reduces the maximum height of the tank. This function was also implemented to reduce the effect of fast accelerations and breaking.

The accuracy of the weapon is not very good, which is probably due to the bad tolerances of the printed acceleration wheels that grip the bullets sometimes better and sometimes worse. You could play around with the diameter of the barrel to see whether that increases the accuracy. However, it could also reduce the bullet speed significantly when the bullet touches the barrel. Since the weapon is meant as a proof of concept, it is totally sufficient for me. More importantly, it is operating reliably (meaning that jamming occurs very rarely) when adjusting the belt and drum motor speeds and the sensor positions correctly: You have to do this as a manual "calibration" for the system to ensure that the belt moves the correct distance between two shots and the drum rotates the correct increment.

I am happy with the result of this project, but there are obviously still some things that could be improved. For instance, the tank is not suited for challenging (muddy, dusty) terrain because of its poor sealing against dust, dirt, and water. Also, I have the feeling that dirt could become stuck between the sprockets and the tracks, so for real offroad usage, the tracks should be designed more openly so that dirt isn't trapped easily any longer. In general, the friction of the printed epicyclic gearbox and tracks are relatively high. It's not a problem for the powerful motors, but it reduces the efficiency (as do the brushed motors in general compared to brushless DC motors). Thus, the runtime could be increased by adjusting these components (but the two 5 Ah LiPos provide more than 1 h runtime, so I don't feel an urgent need to work on that).

Finally, something that I would definitely change if I did this project again is the ADCs: The analog inputs of the ESP32s are noisy, non-linear, and individually different for every single ESP32. That means a lot of time has to be spent on calibrating and compensating the analog inputs to obtain reasonable data. On the other hand, having WiFi onboard and several freely configurable PWM outputs is a big plus of the ESP32 compared with the classical Arduino. A combination of both would be great! Anyway, for my next project(s) with ESP32s, I will for sure have a look at external ADCs and see if they can do the job better.

Thanks to everyone who had the patience to read until the end. I hope you enjoyed this instructable! Feel free to contact me if you have questions or feedback :)

Big and Small Contest

Finalist in the
Big and Small Contest