Tankbot GTR

Introduction

When DPRG member Bill Cole moved out of state, he left
the group a collection of robots and robot parts he didn't have room to take
with him. One of those items was a radio controlled Stuart M5 tank made by
21st Century Toys. Around this same time, several DPRG members were looking
for a way to get a group project started, in part to dispell the curse of GARP,
and in part to begin building up a collection of interesting robots that could
be kept on hand by the DPRG for demonstrations and experimentation. The M5 tank
toy looked like an ideal platform for a group robot project, so some funds
were allocated and we got to work.

A few thumbnail photos are include in the build log. You can click on them
to see the full size image. There are many more images in the
Tankbot GTR photo gallery
that you may want to browse.

Before we get into the build log, we
should give some credit to the many people who directly or indirectly
contributed to this project. So many members have worked on this, that I'm
sure we've left someone out. If your name isn't on this list and should
be, please email me and I'll get it
added.

Build Log

For the most part, we work on Tankbot at our Tuesday night RBNO meetings
at the DPRG lab in Garland. Occasionally we get extra motivated and show up
on a Thursday night or a Saturday too. The following build log will give you
and idea of how things are proceeding.

November 2005

The tankbot project started with a toy remote controlled tank made be 21st
Century Toys. It was fully functional with independent track controls and
sound FX. Unfortunately, we found the 'guts' too be unsuitable: it used only
on-off relays (so there was no speed control) and the motor and gear boxes
were incredibly loud.

So we decided to strip the tank down to its mechanical components. We
also decided that we should paint the tank, and do it right. So we laid
down a coat of white primer.

The wheels and track parts of the Tank were fairly robust and we
disassembled them as much as needed for painting.

The tank originally had a large lip that could get caught doing certain
extreme manuvers, such as driving up steps or down curbs. A hacksaw made
quick work of that.

We used black vinyl dye to stain all the wheel components besides the
tracks. Vinyl dye worked great because it really doesn't build a layer
when used on plastic. It sort of 'soaks into' the plastic. This meant that
the wheel assemblies could be painted without worrying if they would bind
afterwards.

We went ahead and put a second coat of primer on the chassis. If we
were going to paint this, we were going to make it pretty!

December 2005

We decided upon using Pittman 9xxx series motors, as other DPRG members
had used them on similarly sized robots. First, we studied how Ron Grant
mounted his motors to the same model toy tank. He let us know that the hubs
on the drive wheels would need reinforcing.

We also examined how David Anderson mounted the same type of motors on his
J-Bot. He has a lot of custom machined components, but had no problem with his
method.

Steve Rainwater found four Pittman 9413 motors on ebay. From what he could
get out of Pittman, the motors had a reasonable torque and rpm combination.

David Anderson machined some hubs for the tank which provided a sturdy way
of fastening the motor to the drivewheels. They consisted of a round plate
which bolted to the wheel, and collars which bolted to the plate. The collars
have a set screw to secure it to the output shaft of the gearheads on the
motors.

January 2006

The next step was to figure a way to mount the motors to the chassis. Ron
Grant had used a sort of "Floating Tee" to mount his motors. A single peice
of all-thread went along the length of the tank, in the center. Then a peice
of angle aluminum was secured to the all thread, forming a "T". The angle
aluminum could rock back and forth, so there was some mechanical give. He
then fastened the motors to the angle aluminum. It forms a sort of floating
axle.

We decided to copy his idea, and Ron generously made some duplicate mounts
for us out of spare material from his tank.

Michael Giambalvo donated a pair of 14 volt NiMH battery packs. We
planned to connect these in serial to have a 28 volt system. Also, we
determined that the maximum speed of the robot would be about two miles an
hour, which follows David Anderson's rule: "Never make a robot which you can't
outrun."

Ed Paradis and Michael Giambalvo did the handywork to modify the chassis to
accept the motor mounts. A test fit of the motors showed that we need to do
some trimming to make the drive wheels the correct distance away from the
chassis. If this distance is incorrect, the tracks will bind, causing a lot
of noise, wear, and wasted power.

At the January meeting, we demonstrated the robot moving under its own
power. No sensors were connected and a rather inefficient H-bridge was used.
An Atmel microconroller controlled the motors to slowly move forwards, then
slowly move backwards. Not exactly exciting, but it showed that the tank was
mechanically feasable.

We decided on a color: a metalic candy apple red. Steve picked up a few
cans at the auto-parts store and we proceded to paint the chassis. All the
parts were removed from the chassis and we determined that a few had been
incorrectly installed previously.

Over the course of a week or two, we proceded to paint more and more
layers of candy apple red metallic paint on the chassis. We then decided what
it really needed was a gloss coat, so several layers of gloss were slowly built
up on the chassis. The end product was a very very shiny tank. Many brain
cells died in order to obtain this shiny tank.

With the dimensions of the tank increased somewhat due to the many layers
of paint, we found it necessary to sand down some of the parts where bogeys
and wheels mounted. A generous application of powered graphite also helped.
We determined that with the graphite the wheels were much more free spinning.

The tank treads and wheels were reattached, and the motors remounted. We
took this opertunity to rethink some of the distances on the motor mounting,
and made sure everything lined up. We did some testing to isolate points of
friction, adding more graphite or adjusting the drivetrain.

February 2006

We displayed the newly painted tank at the Feburary meeting. We ran the
tank on a single 14 volt battery but did not alter the program. The tank
still slowly rolled forwards and backwards.

Randy Dumse of New Micros Inc. donated a pair of excellent H-bridges to use
with the tank. These bridges feature debug/status LEDs which make them a
pleasure to develop with. Also, VIA donated a motherboard for the project
which would eventually make its way on to the robot.

We decided to test the robot under full power using both 14 volt packs.
The results were very encouraging. Michael Giambalvo developed some firmware
for the AVR to allow for a tethered control mode, meaning we could finally
command the robot to turn and go different speeds. Since the ultimate goal of
the tank is to run as an entry in a RoboMagellan-style outdoor competition, we
decided it was finally time to try it outdoors. The tank performed admirably
on the gravel, grass, and sand behind the DPRG World Headquarters. Turning in
place proved difficult in some circumstances, but by adding a small amount of
forward speed, we could turn very tight arcs.

March 2006

A very wide range input voltage switch 5 volt regulator was donated by Ed
Kaufman of RC Model Works and was integrated with the New Micro H-Bridges. A
small shelf was built to keep these parts and mounted near the motors.

We devised a standard 15 pin connector to sit between the H-bridges and
the Atmel. This should allow other controllers to be used with the tankbot,
without extensive re-wiring.

May 2006 (Pictures 0070-0076)

David Ellis donated four MaxBotix sonars which were built into a small
sonar array on the front of the tank. One pointed forward, one to each side,
and the fourth was saved to point straight backwards, to prevent getting stuck
in tight situations. Each sonar returned a range from 6 to 255 inches, and
were polled individually by the AVR.

The ability to turn in place is important for many schemes of navigation,
so we performed tests to determine the tanks ability to turn in place.

The eventual design of the tankbot was to have a computer communicating
with the AVR, gathering sensor information and sending motor commands. This
interface was developed using laptops instead of the actual computer because
we did not yet have a proper power supply for the computer.

The tank went on to win its first prize: First Place at the Spring DPRG
Show-and-Tell. It demonstrated collision avoidance using a small laptop.
The laptop ran Linux and the command program was written in Perl. The
communication method between the AVR and the computer was designed to be
easily implimented in any language which can manipulate text, so Perl, C,
Java, or even BASIC can be used.

June 2006

David Ellis donated a 12 volt ATX power supply to match the VIA motherboard,
and a spare 800MB laptop harddrive was appropriated from the DPRG pile of
parts. Red Hat Linux v9 was installed on the laptop drive.

August 2006

Steve Rainwater visited E
& D Plastics, a local plastic fabrication company, and collected many
lexan and plexiglass pieces from their discard bins. One of these pieces
was selected for use as an upper deck and mounting plate for the electronics
on the robot. Mike Dodson and Will Kunhle trimmed and machined the plastic
to the right size.

September 2006

Martin Meier drilled mounting holes in the new plexiglass upper deck plate
and and mounted the Mini-ITX and microcontrollers. Having the electronics
on top of the tank allows easy access to the computer, with the batteries
fitting below.

Martin also simplified some of the wiring mess that had accumulated over
the months into a clean terminal strip. A plastic drive case from a discard
IBM Thinkpad was also modified to protect the hard drive and prevent its
metal surfaces from touching the underside of the Mini-ITX.

A monitor, keyboard, mouse, and ethernet can be attached to the Mini-ITX,
allowing it to be used like a normal desktop computer. When this is not
convenient, a laptop can be connected to the Mini-ITX via the Ethernet port
and ssh used to access. A full tool chain and development environment were
available on the robot at this stage, minimizing the work needed to build
and test the code.

Steve started working on using the encoders for proper PID control of the
motors. A simple test program was developed on the Mini-ITX, written in C,
that communicated with the AVR using the serial port.

The robot participated in the DPRG's Outdoor Robot Contest, held at the
Science Place in late September. The robot correctly oriented itself to
attain the first waypoint and stopped halfway to the goal due to an encoder
problem that remained undiagnosed for some time. We also experience some
trouble with the robot turning in place on uneven surfaces. This had
happened before. The concensus is that slightly more torque is needed than
the Pittman 9413 motors are providing.

October 2006

Steve obtained a female IDE to CF card adapter on eBay. This was the first
step in replacing the mechanical hard drive with a solid state flash device.
The female adapter plugs directly into the IDE connector on the Mini-ITX,
allowing a CF card to be added without the need for additional cables and
mounting hardware.

November 2006

Martin Meier donated a 1GB CF card. The Red Hat Linux 9 setup on the
hard drive was transferred directly to the CF card using dd. It booted from
the CF card successfully on the first try. Afterward, a lot of time was
spent reconfiguring to Linux to make it reasonably non-disk intensive to
avoid unnecessary writes.

The robot participated in an outdoor robot exercise organized by David
Anderson at the December DPRG meeting. The encoder problem experienced during
the September Outdoor contest resurfaced. Experimentation revealed the problem
was in the right encoder only. Later testing back at the DPRG lab pointed to
a loose connection in one pin of the 15 pin connector that carries the
encoder and h-bridge signals. One of the connectors is replaced, hopefully
fixing the problem.

December 2006

Ed began a rewrite of the AVR code to incorporate the velocity and
distance calculations that were being done upstream in the Mini-ITX. Steve
got a new set of Pittman motors on eBay, which were swapped out with the
original Pittmans. After some testing it was determined the new motors
were not performing as well as the old ones, most likely due to custom
windings that resulted in less torque than predicted by the Pittman specs
for that model. If motors with more torque don't turn up on eBay soon, plan B
is to swap out the 19.1:1 gearboxes on the Pittman 9413 motors with 38.3:1
or 65.5:1 gearboxes.

January 2007

Steve obtained a new set of 60:1 gearheads for the Pittman 9413 motors and
swapped them out with the old 19.1:1 gearheads. The result was much improved
torque while still maintaining a reasonable amount of speed. Tankbot can now
rotate in place on most low friction surfaces (e.g. cement, asphalt, level
grass, etc.) but tends to slide or stall on irregular ground.

February 2007

Ed delivered completely rewritten AVR code that includes an improved
serial protocol, interrupt support, and new PWM code. He also spent some
time debugging the sonar code. David Anderson built some custom wiring
harnesses for the batteries that include banana plugs to simplify the
process of charging from the Triton charger.

May 2007

Tankbot was displayed and demonstrated at the International Space
Development Conference (ISDC) in Dallas along with other DPRG robots.

December 2007

Scott Sumner added a Linksys WiFi router to Tankbot.

November 2008

Paul Bouchier contributed a new 8Ah lead-acid electronics-battery, to
replace the 4.5Ah battery previously in Tankbot, and constructed a bracket
to mount the batteries in Tankbot's hold. While this will help battery
life, the 3.2 Amps it draws (2.85A from the Via motherboard) will still
limit runtime without the charger. Paul also built charging cables and plugs
on Tankbot which allow the 13.6V power supply and the Triton charger to be
plugged to Tankbot for battery charging & power during FW development.

Will Kuhnle built a mount & brackets for the servo and steerable sonar
(for which Paul Bouchier contributed the servo).

Tankbot competed in Roborama 2008b the weekend before Thanksgiving, and
placed 4th in out'n-back on a double-scale course.

December 2008

Paul Bouchier contributed an Arduino board to run the sonars and compass,
monitor battery voltage, and drive the steerable sonar's servo, and Will
Kuhnle mounted it. The sonars were disconnected from the AVR board and wired
to the Arduino. Paul build an Arduino shield for sonar connectors etc, and
mounted one of Dale's tiny cylons on top of the steerable sonar.

Paul contributed an 802.11b PCI wifi card, which replaced the Netgear
router previously strapped to the 'bot. The router can now be used as a
battery-operated router for field use, while the wifi card gives tankbot
access to the internet.

Paul replaced the ancient version of Linux (2.4 kernel, Red Hat based)
with a recent version of Puppy Linux, at Steve Rainwater's suggestion. This
provided a 2.6 kernel and USB-serial port & wifi card support, and is
optimized for running out of the compact flash card. Along with VNC, it
allows for GUI-control over tankbot. However, typically for Linux, getting
connected to the club wifi network is proving problematic.

Paul contributed a USB webcam, to be used in tankbot's vision system.

Paul built a tether with a mast, which allows tankbot to wander around a
little while remaining AC-powered.

January - February 2009

Paul tried to get wifi card working. He ordered a different wifi card,
which didn't work in Tankbot's PCI slot either (yet it worked in Paul's
home PC). Ed found that the originally contributed wifi card doesn't have
linux support. Problem still not solved - possible problem with PCI slot?

Paul contributed a 2GB USB thumb drive, & club donated a USB hub to
accommodate the increasing number of packages

Filled out Puppy Linux package suite: added sshd, samba server exports
the robot-FW part of the filesystem as a share, devx package adds gcc +
development environment. Rebuilt & tested the apps that ran on the previous
RedHat linux.

Paul contributed an electronic compass after reading how to use them
properly, and how dead-reckoning turns can't work on a tracked robot

Tankbot appeared at All-Con, attracting attention by rolling back and forth
on the DPRG display table, as well as appearing in the DPRG petting zoo event.
Despite not behaving well at times, Tankbot was well received by attendees

Jason Oliver contributed a USB wifi dongle which worked great on
Puppy Linux. This was fortuitous, because Tankbot's ethernet port
started to exhibit intermittent failure symptoms.

Paul wired up the compass connector to the arduino on the home-made
shield and installed some Arduino code to continuously poll it & print
the heading.

April 2009

Paul constructed a mast to mount the compass on and keep it away from
metals and current.

May 2009

Paul entered Tankbot in the RoboRama 2009a Square Dance contest, an event
roughly based on the idea behind the Borenstein Square or UBMmark. Despite
nicking a couple of the corner markers, Tankbot did remarkably well and
returned almost precisely to its original starting position. The improvement
in navigation is due almost entirely to Paul's work with the new compass.

July 2009

Having completed his goals with Tankbot, Paul decided to move on to other
projects and pass Tankbot on to another member or team. He posted a
"message
from Tankbot" to the DPRG mailing list on July 8.