Build, learn and share robotics.
New to this site? Get started here to share your creation

"Tank Bot" is a simple autonomous tracked robot. He navigates over slightly rough terrain avoiding dangers like plants and fences. He is made from Tamiya tracks, twin motor gearbox and uses a Pololu A-Star micro as the brains.
Tank Bot Finished!

Tank Bot on his first excursion outside...

The Build

Tank Bot is put together with a minimal amount of soldering, a bit of Bostik Blu Tack and some hot glue. 
First up, the Tamiya Track set, universal plates, twin motor gearbox where assembled and put together. This photo shows the arrangement.
Using the gear pinion and arrangement above meant the full length of each rubber track was used. Note the gearbox was the "Twin Motor" not the "Dual Motor" version which is slightly wider and doesn't fit the plates. The Twin gearbox can be assembled with two different gear ratios, 58:1 was used for this build.

Next some wires and switch were soldered to the 4xAA battery pack.
A bit more soldering with the motor wires. I also added some 0.1uF capacitors between the motor leads to reduce electromagnetic interference. This didn't work enough - see later.

Note: The motors used were size 130 Pololu 6V motors. These are the same size as the ones in the gearbox kit but run at higher voltage and lower current which makes choosing a motor driver much easier. The Mabuchi motors in the Tamiya kits work at 1.5-3V but can draw a few amps of power if stalled. Finding a motor driver with those specs is quite hard.

The second plate from the Tamiya plate set 70157 was mounted on top using some 30mm standoffs and then the breadboard with motor driver, voltage regulator and A-Star added.
Again, more Blu Tack to hold the breadboard and battery holder in place.

I soldered the header pins to the motor driver and A-Star so that the PCB labels would be visible when inserted into a breadboard. The 5V step up/down voltage regulator is used to provide a constant 5V to the A-Star board regardless of the battery charge.

Finally, the HC-SR04 ultrasonic sensor is mounted the Blu Tack and a mess of wiring was added. The switch hot glued to the plate.

The Wiring

The voltage regulator connects directly to the 5V pin on the A-Star to provide regulated power for the A-Star and also for the ultrasonic sensor. The A-Star's own regular is not used as it requires a minimim of 5.5V and the batteries will get lower than that after a little use causing shutdown.

The motor driver is connected to the A-Star using 6 wires. Arduino pins 9,8,7,6,5,4 to the motor drivers input pins. 
HC-SR04 sensor is connected to pins 2,3 on the A-Star.

Nothing happened for a while until I connected the standby [STBY] pin on the motor driver using a 10k resistor to 5V (VCC) to enable the driver. 

I will try and get a Fritzing diagram up to explain this mess...

The Code

I wrote a basic program to get the robot to drive around. If it sees something it will slow down and avoid it by turning. The code is a bit rough with a few delay statement to make life easier. See attached file


The first problem was that the motors would not go no matter what I did. Seems the STBY pin on the motor driver needs to be held high. Probably should read the documentation first!

Next up, whenever the motors got going the reading from the HC-SR04 sensor became really erratic, anywhere between 0 and 200cm. I tried a capacitor across the regulated 5V to stabilise the power to no avail.

Adding more capacitors across the motor terminals fixed the issue. Turns out that it was electromagnetic interference causing the issue.
Each motor now has one capacitor between the terminals and one from each terminal to the motor casing. I didn't think before soldering to the motor casing which made it hard to fit the motors back in the gearbox.
Cleaning the motor casing with a bit of light sand paper made it much easier to solder.

See electromagnetic interference from the motors


Parts Used

Tamiya track and wheel set 70100
Tamiya plate set 70157
Tamiya Twin Motor Gearbox 70097
Pololu A-Star Micro
30mm Standoffs
3mm Screws for standoffs
Ultrasonic Sensor - HC-SR04
4xAA holder with switch for 6V.
2 x Pololu 130 motors - replace the Tamiya ones
Pololu TB6612FNG Dual Motor Driver Carrier
5V, 400mA Step-Up/Step-Down Voltage Regulator S10V4F5 to power the A-Star Micro