Introduction: 3d Printed RC Controlled Tank!!
Have you ever wanted to have a remotely controlled vehicle that can go off road and you can even see from a first person view camera, then this tank is awesome for you. The tracks on the tank allow for great grip when driving on terrains like dirt and trimmed grass. The tank works extremely well on carpet and hardwood floors, making it perfect for indoor use on rainy days. The tank is driven by 2 motors. You control it from a remote control. It also has a mount on top that allows for cool modifications like FPV cameras and even a robot arm if you choose to design it yourself!
Step 1: Electronics Needed
To build the tank you have to have a couple of electronics. Obviously you need 2 motors. Each motor powers its own track. The tank and remote both are powered by the Adafruit Feather M0 Radio. Below I have listed links to all of the parts you will need:
The following components are required for the tank to function:
- 2x Motors
- 3 AA Batteries
- 3 AA battery holder
- Motor Driver
- Adafruit perma-proto
- PCB Boards
- LED Set #1 + #2
- 2x Joy Sticks
- 3x Switches
- Lcd - comes in pack of 2(make sure to get the I2C model)
- 2x Adafruit Feather Radio Boards
These components are not required but can be fun additional add ons
Step 2: Wiring the Tank
Below I have left each section an told you where there wires go:
I simply just solder wire between each connection. You can use this diagram to help you however you want.
*The motor driver goes on its own PCB board.*
PWMA = 19
AIN2 = 13
AIN1 = 16
BIN1 = 17
BIN2 = 18
PWMB = 6
STBY = 15
The left motor is "MOTORA" and the right motor is obviously "MOTORB"
Make sure the you are using the appropriately sized board to host the feather(4cm*6cm). Also you need to have the feather lined up correctly so that the micro usb spot and its corresponding hole(in the main printed piece) line up. The left set of pins must be two spaces from the side and the right pins must be 3 spaces from the sides. Also the board should be as far up as it can go. Female pins are soldered to the board an then male pins attach to the female pins.
Step 3: Wiring the Remote
The remote is a little more complicated but I will do the same format:
*note that when soldering the feather for the remote to the board make sure there are 2 open slots to the left on the perma-proto and one to the right. This ensures that the usb port will align with the holes. Also it is as far up as can go and the male pins are soldered to the board directly.
Also I just solder wire between the two points. And use the board only for circuits.
No use... yet :)
Outer pin(Any): Ground
Inner Pin: Enable pin
*Used as a brake system
Outer pin(Any): Positive
Inner pin: 19
Red Pin: 12
Green pin: 11
Blue pin: 10
Power pin: 3V3
Power(Longer pin): 13
Ground(Shorter pin): Ground
For the buzzer I used a transistor to make it louder so basically it is powered by the main power but triggered by the Feather pin.
Left pin: Goes to positive buzzer pin
Middle: signal, pin 6
Non positive pin(AKA ground): Ground
That concludes all of the painful wiring :)
Step 4: Uploading the Code and First Test
I am going to be using Visual Studio Code and PlatformIO to upload the code. If you do not know how to use this check out these links: VSC, PIO. Now you are going to need to install these two GitHub repositories:
Make sure that you properly install all needed libraries
Now you are ready to upload you code... first let's start with the tank code. Plug the tank in via the usb port to your computer. Then press the upload button at the bottom.
Now you can upload the code for the remote. The process is pretty much the same but now when you are done uploading the lcd should power and say "Loading..." then shortly after it should say "Connected". If the screen is connected that means that the green light should also be on.
Right now in order to use any color sensing or ultrasonic sensor features you will need code it yourself.
Step 5: 3d Printing
Once everything is uploaded and you are happy with how it came out than you are ready to start 3D Printing the model. First step is to download all of the files from my Thingiverse design page. I have also left the fusion 360 file there in case you would like to modify the tank yourself. The Thingiverse page has information on what items to print and recommended settings.
Make sure to print the 2 remote parts too.
Once everything that you need is printed out(It should be around 500g) you can move on to assembly.
Step 6: Assembly
Now that everything is printed we can work on putting the tank together. You will need a couple different screws for this, I will tell you as we go.
1) The first step is to assemble the sides. The first part is to attach the motor. Simply slide the motor into the slot on the backside of the side panel(part 1). Then use two M3 by 12mm to secure in the motor back plate(part 2). Then you can mount the motor driven wheel(part 3), it should just pressure fit onto the motor shaft. If the wheel does not stay on the shaft then you add some hot glue to the motor shaft which will hold the wheel on securely. Next add the front wheel(part 4), take an 20mm M4 screw and M4 nut(I recommend loctite nuts if you have them, otherwise no big deal. Put the nut in the cutout on the back side of the side panel(part 1). Then put the screw through the wheel(part 5). Now you can tighten the nut until the wheel is secure but make sure it can still spin. If it can't spin then you need to loosen the screw. If you don't have loctite nuts make sure that you secure this with either super glue or hot glue. Now you can add the track(part 6) onto the wheels. The track consist of 25 pieces. Any less and it won't work and any more it won't work :). What you want to is snap all 25 together... once it is one continuous chain you can rap the track around the 2 wheels(part 3 & 4). It will require some muscle and force to snap the final pieces together. Now you can do this whole process again for the other side! Make sure that when working on the second side the motor is wired through the main body(part 6)
2) Now we can work on inserting the electronics. You will need the main body(part 6) First step is to snap in the lithium ion battery this simply snaps(with a little force) into spot 1. Next we are going to insert the AA battery holder. To start you will have to desolder its connection to the main board. The battery holder should have come with 2 screws and we will use those screws to secure it in to its bottom bay. So insert the battery holder into the opening in the main body(part 6) bottom spot 2. Now what you want to do is make sure the batteries are all out of the holder. Then take the screws and secure the holder down to the main body(part 6). Now you can put the battery cover on(part 7), it just snaps into place. If you are having trouble with snap fit on the bottom try reprinting the cover at a finer layer height (0.16mm).
3) Sensors! If you are using any sensors now is a good time to attach them. We will start off with the ultra sonic sensor, this can simply just be glued in place(with hot glue). It goes in the 2 holes in the front, spot 3. Make sure to desolder the pins and use wires directly soldered to the pads. Also make sure that the actual sensor is facing out. Now just add some glue in the inside and that is done. Next we will work on the color sensor. This simply just push fits in its cut out right below the ultra sonic sensor, spot 4. Next is to put in the main controller board. This goes in spot 5. Make sure that all connections are wired and you may even want to test the tank before securing this. Push its spot and it will take a lot of force to fully secure. The usb port should be aligned if you have done this step correctly. Finally we will put the motor driver in to spot 6.
Make sure that the motors turn the right way, if the go in opposite directions then you need to switch the wires.
4) The final step is to secure tracks to the main body. All you have to do is take 8 M4 16mm screws and the final piece, the track guard(part 8) and you will 4 of screws to secure the guard into the frame. Simply just snap the side piece in and then secure the screws, the screws will self tap them selves.
5) Final step for real. Just take your screw cap (part 9) and screw it in to spot 7. This cap is just for various add ons. Mine is for a GoPro.
Step 7: Assembling the Remote
Assembling the remote is pretty easy
- Secure the joysticks in the upper lid using 2 12mm M3 Screws. Now add the cap to the joysticks.
- Tightly screw in all three switches. I have my switches so the power switch is in the middle.
- Next push the 2 lights into their holes, RGB left hole and green light on the right. Once secure I added some hot glue to help keep them in place.
- The final part for the top is the LCD. First make sure the text is the right way(I like the joysticks at the top when I am holding it, but it does not matter too much). Then with 4 M3*6mm screws you can hold the corners in place
- Now you can push the battery in with a little bit of force.
- Now push the Perma-Proto board into its little cut out. Make sure that the antenna sticks out of its hole.
You are done assembling the remote. Just snap the top and bottom together and you are good to go!!
Step 8: Enjoy Your Tank!!
If everything worked successfully then you should be able to power both devices up and you should be able to control you tank! If you are having problems then refer back to the wiring and assembly page(your problem is most likely faulty wiring). Anyways you now have a fully working tank with many use cases, especially with the screw on top.
To drive all you need to know is that the left joystick controls left wheel and the right joystick controls the right wheel. To turn left simply keep right joystick forward. Vice Versa. If you are on hardwood floor you can try an advanced turn, one joystick forward and the other in reverse.
If you printed a screw on top for the GoPro then a great way to have some fun is to attach the GoPro and then use the GoPro app to spy on others!
When I start working on a new tank I will want to have more powerful motors and maybe more motors. I will probably use stepper drivers instead. I may want to add some height to make it so it can go more off road. If you like this tank watch out for a new version maybe in a little while.
Hey thanks for reading this far, hopefully at this point you have yourself a working tank! If you liked this build or want to do this in the future please hit the favorite and vote button for me! Thanks a lot and enjoy your tank!
Participated in the