Introduction: 3D Printed DIY Remote Controlled Tank With Operational Gun
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!
Attachments
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
34teeth.step
36teethto17teeth.step
axle spacer (closed).step
axle spacer (open).step
bottom cover (gearbox).step
bottom cover (idler).step
center cover (back).step
center cover (front).step
headlight back cover (left).step
headlight back cover (right).step
headlight barrel (left).step
headlight barrel (right).step
inner frame (gearbox).step
inner frame (idler).step
motor driver holder.step
motor gear (8teeth).step
outer frame (gearbox).step
outer frame (idler, back).step
outer frame (idler, front).step
sensor wheel.step
side cover.step
top cover (gearbox, back).step
top cover (gearbox, front).step
top cover (idler, back).step
top cover (idler, front).step
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.
When installing the linear actuator, make sure that the potentiometer can sense the full travel length of the actuator. It is most convenient to install the actuator in its center position (31 mm travel length available to bottom and top) and having the potentiometer also in its center position when installing it. The full travel length of the actuator corresponds to around half a rotation of the potentiometer, which then ensures that the full travel length is within the measureable limits of the potentiometer (270 degrees). Note that the code for running the actuators does not make use of the full travel length of the actuator to prevent excessive tension on the tracks. Refer to the images to see the used interval relative to the lower limit. Keep in mind that the actuator moves up to lower the body of the tank, and vice versa.
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
Attachments
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), and a 60 A fuse between batteries and tank electronics
- 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)
Attachments
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
Attachments
Suspension bracket.step
Upper chain wheel_outside.step
Lower chain wheel_outside.step
Axle spacer_605_nutside.step
Spring endstop.step
Axle spacer_605_screwside.step
Chain wheel hub.step
Chain wheel carrier.step
Axle spacer_608_nutside.step
Axle spacer_608_screwside.step
Chain tensioner hub.step
Upper chain wheel_inside.step
Body connector.step
Lower chain wheel_inside.step
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
Attachments
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
Attachments
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
Acceleration wheel.step
Barrrel.step
Base plate.step
Belt.step
Belt bevel gear.step
Belt holder (left).step
Belt holder (right).step
Belt holder base.step
Belt idler.step
Belt motor frame1.step
Belt motor frame2.step
Belt pulley nutside.step
Belt pulley screwside.step
Belt pulley1.step
Belt pulley2.step
Belt pulley3.step
Bullet.step
Drum back spacer.step
Drum back.step
Drum frame (back).step
Drum frame (front).step
Drum frame base (back).step
Drum frame base (front).step
Drum frame insert (left).step
Drum frame insert (right).step
Drum frame left.step
Drum frame right.step
Drum frame spacer.step
Drum front.step
Drum insert.step
Drum motor base.step
Drum motor frame1.step
Drum motor frame2.step
Drum spur gear.step
Limit switch base.step
Limit switch frame1.step
Limit switch frame2.step
Motor clamp (back).step
Motor clamp (back, left).step
Motor clamp (back, right).step
Motor clamp (front).step
Motor frame.step
Motor spacer.step
Sensor holder.step
Text plate.step
Wheel cover insert.step
Wheel cover.step
text insert (no weapon).step
top cover (no weapon).step
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
Attachments
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 braking. 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 braking.
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](https://content.instructables.com/FB5/9DK9/LF2JSZ8V/FB59DK9LF2JSZ8V.jpg?auto=webp&crop=1240%2C600&frame=1&width=320)
First Prize in the
Big and Small Contest
27 Comments
3 months ago
Great job
4 months ago
Wow! I'm impressed with this design and intend to make it. I'm already committed since I ordered most of the parts. The weapons motors were the hardest to find in the US, I had to order them from a supplier in Germany on Ebay for about 11Euro's each. The supplier you listed wanted 80 Euro's to ship to US. The potentiometers were also hard to find in the US but I can get some here and modify the mounting holes and gears to fit since you provided the .STEP files. Do you have any photos you could share of your wired up electronics compartment? So far I have the main body printed and assembled and everything fit together perfectly. I'm also learning a lot, I never used the ESP32 but got some and got them working. I also never used the individually addressable LED with I will probably play with those today while parts are printing. If only my Prusa MK4 kit would get here so I would have another printer working :).
Reply 4 months ago
Thanks a lot for your comment! Wow, that is quite expensive for a motor that I purchased for 1 €. Please share photographs of your build once it is done! I'm looking forward to seeing another Crawler out there :)
Below, you can find a photograph of the opened electronics compartment. I did not add such a picture in the instructable because it is mainly an example for how to not do cable management. There is a lot of cables, so to help with wiring, I started bottom-up: According to the instructable, you can start with wiring the main motors, the batteries, the LEDs and sensors in the front and rear, and the linear actuators. Once that is done, you can continue with adding the boards and components in the electronics compartment and wire everything "on top" of those. Still, there are a lot of cables, and to help me with identifying the cable routing, I added little stickers to the wires that indicate to which component a wire leads. And don't forget to add enough headers to distribute ground to all the different components (you should plan for > 20 ground signal distributions).
Please let me know if you have questions on a specific step of the instructable!
Reply 4 months ago
As parts are printing I am designing a couple of PC boards, one will have the ESP32's and most connections to the rest of the tank and the other is the power PCB which will have the home made weapons motor controllers as well as the IRFP7430. My question is what are you using for the 60A fuse on your PCB? I also couldn't source the 5000mAh battery you had so I had to go with ones a little narrower but 2mm thicker. I modified the base frame and front and back plates to get the extra 2mm.
Thanks,
Dave
Reply 4 months ago
You're right! Sorry, I forgot to add the link for the fuse in the description of the electronics. My PCB had a cut-out to mount this fuse: https://www.reichelt.de/kfz-sicherung-midioto-60-a...
But of course, you can use any form factor of the fuse that fits your needs.
Reply 4 months ago
Thanks for the photo! I see you have heat sinks on your ESP32's, do they get hot without them? I got my gear and potentiometer mount updated and built up a linear actuator and installed it, again, I am impressed with the actuator design and everything went together perfectly! I was looking at your software and see you have 4th order polynomial curve fits for the potentiometer readings, that A/D must really be non-linear! I checked out your polynomials and they only go to about 0 to 60% for a full turn of the potentiometer and the potentiometer seems to go a little over a half turn in the assembly. Am I correct in assuming that HLFv (and other HXXv variables) should go from 0% with actuator at bottom and 100% with actuator at top?
Thanks, Dave
Reply 4 months ago
Hi Dave! The heat sinks on the ESP32s are optional. They should work without them, too, but when an ESP32 is using WiFi, it is getting hot over time (and I tend to go for "an extra heat sink doesn't harm").
The ADCs of the ESP32s are indeed quite bad in terms of linearity. You'll have to see how well yours work and if you also need a 4th order polynomial correction function since these calibrations are individual for every single ESP32.
The potentiometers can turn up to 270 degrees: You need to install the potentiometers in a rotational position relative to the rack of the actuator so that the upper and lower limits of the actuator do not reach the limits of the potentiometer. The full extension range of the actuator (62 mm is the travel length) corresponds to around half a turn of the potentiometer, which means you do not have to perfectly center it, you'll have some degrees tolerance for the assembly (which will be corrected by the calibration afterwards). Thus, you should try to assemble the actuator in the center (31 mm travel available up and down), with the potentiometer roughly being centered. With this setup, I did the calibration of the actuators, measuring the distance between bottom and carriage. So the range that needs to be calibrated is the ADC values between 0 mm (actuator in lowest position) and 62 mm (actuator in highest position). The "0 to 100" in the code is actually a typo since the correction function directly converts analog values into height of the actuator. Thanks for that hint, I'll update the code!
Also, you should note that the tank in the end does not make use of the full travel length of the actuator (to avoid excessive tension on the tracks). Again, that is something that you'll have to double-check in the code of your model because everything depends on the calibration of the actuators. For my prototype, the actuator limits used by the code are (measured as indicated in the image below): 56 mm (lowest body position); 36 mm (center body position); 16 mm (highest body position). The actuator moves up to lower the body, and down to raise the body - keep that in mind when wiring and programming everything :)
Question 4 months ago on Introduction
Hey im new to this field and am just starting to learn some basic IT and coding stuff at the moment, but i want to learn and be able to understand all of this. So my question is what specific educational background do you have and what do i specifically need to focus on to be able to get to this level of knowledge without wasting too much time and especially money? Is the university/college route the only way to go to be able to properly understand and go about this?
Answer 4 months ago
Thanks for you question! Although that is a tricky one ;)
So my background is from university, but I did not attend any courses related to mechanics or electronics. I started with a simple stepper motor control that I needed for work, together with the required CAD to build some mechanical parts. From that time on, I was hooked to these topics and continued with several hobby projects. Thus, I'd say there was no specific course/education that led to this project but rather a lot of trial and error and searching the internet.
Question 5 months ago
bonjour
ce Projet est super. Je suis déjà entrain d'imprimer les pièces.
Par contre avez vous un plan détaillé des emplacements des inserts, roulements a billes, tiges, etc..
Ainsi qu'un plan de branchement électrique des différentes parties électroniques détaillés car je suis un peu novice dans cette partie là.
Dans l'attente d'une réponse.
Cordialement
Answer 5 months ago
Thanks for your comment! However, I'm afraid I can only answer in English.
Regarding your question: The images in every step contain comments that will help you with the assembly as they explain where which part has to be put. I tried to balance this instructable to include all relevant information without making it excessively long (and it is already a lot of text!). I also wanted to find the same compromise for the electronics: All parts that you have to build on your own are described as sketches. The rest is very much straightforward: The pin lists for the microcontrollers are provided, and the off-the-shelf parts like logic level shifters and motor drivers are labelled with which wire has to be put at which point. Something that you inevitably have to do manually is checking the directions of the motors and calibrating all the analog inputs. Depending on how you wire the motors to the motor drivers, their rotational direction will be inverted compared to the code provided in the sketches. It is most convenient to connect the motors, check if the direction matches the code in the sketches, and either invert the direction within the sketches (possible for the track motors and the actuator motors) or adjust the wiring to the motor drivers (weapon motors) if needed. For the analog inputs, you have to calibrate them because of the poor linearity of the ADCs of the ESP32, and especially for the linear actuators because their analog signal is individual for how you assemble them. If you get stuck at a specific step of this project, please let me know. I can then, of course, help you with that.
Question 5 months ago on Introduction
Can I BORROW THE BLU PRINT PLEASE
Answer 5 months ago
I'm sorry, but what do you mean with blueprint? I hope I provided everything
about this project in the instructable. I can share a rendered image of the tank, if you like.
I don't think technical drawings would be of much help for building this project since the components merely have to be printed and screwed together, and the required CAD files are already uploaded.
5 months ago
Wow, the mechanical design is amazing! This project is serious, not just someone messing around with a 3D printer.
5 months ago
TRDB, I admire your project. Almost just to enlarge it and have a real tank.
I likes the deepest detailed mechanical design: the suspension, the doubled inclined gears, the planetary Gears, all the sensors you could add...
Could you explain more how you fire the bullets?
Reply 5 months ago
Thank you, I really appreciate that! It took quite some time to design and optimize the mechanics :)
The firing of the bullets is enabled by the two acceleration wheels. They have a fixed distance to each other (10 mm +- tolerance of the printed parts) and rotate very fast (up to 10k rpm). The left one rotates counter-clockwise and the right one rotates clockwise. The conveyor belt pushes a bullet between the two wheels using its protruding pins. The bullet has a slightly larger diameter than the gap between the two wheels (diameter of the bullets: 10.75 mm +- printing tolerance), which means that the bullet is tightly pressed between the two wheels. Due to their fast rotation, they are not blocked by the bullet but they transfer the kinetic energy of the rotation to it, meaning they accelerate and eject the bullet from the barrel.
There are two bullets in a row per slot within the drum, and the drum has eight slots. Thus, the conveyor belt can push two bullets per slot between the acceleration wheels for firing. Then, the drum rotates to the next slot for the next two bullets. This concept results in a total capacity of 16 bullets. The tank reads sensors for the movements of belt and drum, which enables it to detect when a shot has been fired, and thereby it can count the number of remaining bullets in the drum.
5 months ago
What a GREAT project and incredibly well done. I was wondering, on the accelerator wheel, do you think maybe designing it so you can install an O-ring on it will help with reducing the wear and need to replace it on a regular basis, and when replacing is needed, it's just a simple O-ring? Keep up the GREAT work.
Reply 5 months ago
Thank you! That is a very good suggestion. Yet, the wear out of the acceleration wheels is not at their outer circumference where they grip the bullets, but actually in the center where they are mounted on the motor shaft. Due to the acting forces, this tight fit wears out, which results in the wheel becoming loose (I did not want to add a screw for clamping the acceleration wheels to avoid exessive unbalance of the wheels). However, having a rubber surface to make a better contact to the bullets could still improve the reproducibility of the firing mechanism and thereby improve the accuracy. I'll give that a try!
5 months ago
Excellent and impressive project. I'm speechless!! How much did it cost you to build this tank?
Reply 5 months ago
Thanks a lot :)
I added a rough estimate for the costs in the supplies section. It's actually hard to specify an exact number because many parts I purchased for the project came in larger batches, meaning that I'll have them available for future projects. So it depends a lot on how much one already has in their workshop at home and how to count that. Long story short: I guess I spent around 800 € on this project.