As an avid fan of history and innovation, I enjoyed learning about the development of tanks during the world wars. The complex combination of a tank's moving parts fascinate me, and I wanted to specifically learn how the system of gears and tracks are designed for smooth movement. Well, what better way to learn than by doing?
Before I began any major research or development for my design challenge, I wanted to lay out clear goals for myself. This was especially important because I had some big plans, and I knew that there would be multiple stages to my project's development.
Create a custom app for controlling tanks movements via Bluetooth
Create a custom PCB circuit for the tank instead of using breadboards
Design a modular tank system that allows for interchangeable tops, including:
WWII Sherman Chassis
6-Axis Robot Arm
Projectile-Firing Turret
With my goals laid out, I began my researching gears and tracks. Because I needed to use custom sized gears, I ended up using my geometry skills to calculate the proper distance between track links and the number of gear teeth. After I got a simple snap-together chain printed out and working, I added to my chain design to create wider tank tracks with texture for traction. I ended up needing 27 links per side of the tank.
With the tracks done, I began designing a base chassis to house the motors and electronics. My initial design was simpler because I planned on simply gluing the motors in place. However, I quickly realized that this would prevent me from ever adjusting the track tensioning, so I made a second version with adjustable motor mounts.
Once I was satisfied with the lower chassis, I began designing a Sherman top by referencing blueprints from WWII. The first was relatively simple, with just a servo to control the turret. However, my first iteration of the turret mount was poorly designed, so I created a new version with direct attachment to a servo. I added LEDs and switch too.
With the mechanical components finished, I decided to move on to making the electrical students. For prototyping purposes, I began just by assembling a breadboard circuit with a L293d motor controller and HC05 Bluetooth module.
Once I was confident that my circuit would work, I decided to challenge myself. I wanted to both learn how to design a circuit in Fritzing. It may not be the most beautiful, but it certainly helped me plan out the exact positioning of components and wires so that there would be less error during PCB soldering.
Yay, the prototype tank chassis and soldered PCB is done! However, how can I test that they work? Evidently, I need a way to control the tank. It was at this point that I began trying to learn how to create my own app. Since I was a beginner to app design, I took advantage of MIT's App Inventor software to learn app programming.
As I started using MIT App Inventor, I figured it would be really cool if I could design a digital joystick to variably control the tank speed and direction. I did this by using the various UI features of the app programming software. On the programming side of things, I had the app update the "state" of the tank whenever inputs were sent via the joystick.
Next, I added Bluetooth functionality to the app. This allowed me to send the "state" of the joystick to the tank circuit's Bluetooth module. The Arduino was then able to read those states and send the appropriate commands to the motors.
In order to properly control all the features of the Sherman tank chassis, I needed to add an interface to my app for controlling the servo that is attached to the Sherman gun. Unfortunately, due to the 1 byte size of my setup's Bluetooth communication, adding servo control would mean that I would no longer have enough states to use the joystick control. Thus, I created a second app just for the Sherman tank that utilizes simpler button controls. Instead of varying speed and direction with just one touch, I had to separate movement and speed control into two separate sections. This allows me to free up states for controlling the servo.
With the app and Arduino programming done, all that was left to do was attach the Sherman chassis and start driving!
In the end, this was a very educational and successful first phase to my modular Arduino tank (M.A.T) project. I learned how to design tank tracks, how to solder circuits, how bypass capacitors work, and how to program my own app. I can't wait to use this knowledge in the next phase of design: the 6-Axis Robot Arm. In the meantime, all the code that I created and used can be found here at my GitHub.