DFRobot recently sent me their Devastator Tank Platform kit to try out. So, of course, I decided to make it autonomous and also have GPS capabilities. This robot would use an ultrasonic sensor to navigate, where it moves forward while checking its clearance. If it gets too close to an object or other barrier it would check each direction and then move accordingly.
The kit comes with extremely easy-to-follow instructions for putting it together. In addition to 4 simple structural pieces, it features many different mounting holes that can support boards such as the Raspberry Pi and Arduino Uno. I started by getting the suspension attached on each side of the chassis, and then put the wheels on. After that I simply screwed each piece together and added the tracks.
2
Creating the Electronics
I decided to use a Teensy 3.5 for the brain on my robot, as it could support multiple serial connections and ran at 120 MHz (compared to 16 for an Arduino Uno). Then I attached the GPS module to the Serial1 pins, along with a Bluetooth module on Serial3. The L293D was the best choice for a motor driver, as it supports 3.3v in and 2 motors. Last was the servo and ultrasonic distance sensor. The chassis supports one microservo on the top, and in addition to that I glued on an HC-SR04 due to its low power usage and ease-of-use.
3
Making the App
I wanted this robot to have both manual and autonomous capabilities, so the app provides both. I started by creating four buttons that controlled each direction: forward, backward, left, and right, and also two buttons for switching between the manual and autonomous modes. Then I added a list picker that would allow for users to connect to the HC-05 bluetooth module on the robot. Finally I also added a map with 2 markers that displays the location of both the user's phone and the robot. Every 2 seconds the robot sends its location data via Bluetooth to the phone where it is then parsed. You can find it here https://github.com/having11/RCTankApp