Getting Up and Running With a Tamiya Twin-Motor Gearbox

For my latest no-nonsense, keep-it-simple robot platform I'm using a Tamiya twin-motor gearbox. Tamiya makes a full line of small gearbox kits for different applications. While it might be tempting to dismiss these gearboxes as toys, they're actually fairly capable for their size and an easy, economical way to get a small to medium size wheeled robot project up and running. One of their virtues is that they fit handily with other parts from the educational series. The twin-motor gearbox screws directly to a universal plate without the need for any additional mounting hardware. Tamiya also makes a range of wheels and other parts to fit the 3mm hex shafts.

When you assemble the twin-motor gearbox you have two gear ratio options 58:1 or 203:1. The rule with gear ratios is the higher the gear ratio, the slower the rotation and the greater the torque. Here I need strength more than speed so I'm using the 203:1 configuration. I'm even considering upgrading to the Tamiya's dual gear box which has a beefier 344:1 gear ratio option - this robot is only going to get heavier.

More than half of Tamiya's gearboxes, including all of the two-motor varieties, use the Mabuchi FA-130 DC motor. The Pololu website has quite a bit of information on these motors. In addition to Tamiya gearboxes, Pololu sells both replacement FA-130s and upgrade motors that fit in the gearboxes. This tickled my curiosity so I tried to do a little of my own research.

Mabuchi is one of the world's largest manufacturers of small motors. Its products are found in everything from toys, to small appliances like hair dryers, to automatic windows in cars. The company has a great history in the toy and hobby space and its motors were found in the earliest slot cars and other motorized toys. In contemporary times, the FA-130 is ubiquitous and available from many vendors. It is also used extensively in toys and commonly sold as a generic or re-branded "hobby" motor.

The FA-130 designation is based on Mabuchi's naming conventions. The "F" indicates the flat case style, the "A" that the brushes are metal, and the "130" specifies the physical size. While there is no official standard to this effect, there are a number of motors available with an identical (or nearly identical) form factor. Some will have a 130 buried in the part number, others will not. You'll even find references to "130 style" motors from time to time. As the F*-130 designation only refers to the size and shape, you'll find these form factor motors with a wide variety of specifications for voltage, current, speed and torque.

The Pololu upgrade motors are physically compatible with the FA-130 but run at higher voltages and draw a good deal less current. These characteristics are attractive. The FA-130 operates between 1.5 and 3 volts, which is great for small battery powered toys, but low for many of the garden variety motor controllers available for microcontroller projects. At the same time, the FA-130 has a stall current of more than 2 amps which is pretty demanding.

As a quick aside - the 3 volt maximum on the FA-130s is real. I ran them briefly at about 3.4 volts and they gave off that familiar, distinctive burning smell. At higher voltages they'll completely burnout in short order. If you're interested in the details, the Pololu site has a fun write-up from a hobbyist who did his own experiments showing just what happens when you overdrive the motors - complete with photos of the fried motors.

Despite all this fun learning about toy motors, I didn't see any compelling reason to change out the FA-130s in the Tamiya gearbox. In fact, swapping out the standard, readily available motor, for a special order motor, seemed a little counterproductive to my goal of simplicity and repeatability.

Using two Texas Instruments SN754410NE h-bridges in parallel for a motor driver I was able to easily setup to run at an acceptable voltage and deliver enough current to keep the motors happy. I was already planning on using pulse-width modulation (PWM) to control motor speed, if for no other reason than to drive in a straight line (no two motors will ever run at exactly the same rate for a given voltage). Once you're using PWM, it's simple to keep the effective voltage to either motor under 3 volts.

For a differential two-motor drive with PWM, I'm using a six wire configuration. Two PWM outputs from the ATMEGA1284P microcontroller go to the enable pins on the SN754410NE, while four standard digital outputs control the motor direction.

As for the current requirements - also not much of a problem. Although the SN754410NE is only rated for 1 amp per channel, you can connect them in parallel to double the amperage. Simply wire pin 1 of the first chip to pin 1 of the second chip, pin 2 to pin 2, and so on. Some folks will actually stack the two chips and solder the pins, which saves space but virtually necessitates gluing a heat sink to the stack. I've also seen 4 and even 8 chip configurations, but that might be getting carried away!

One thing last thing to note about getting the Tamiya gearbox up and running is that the motors generate a fair amount of electrical noise. In this case the noise was enough to spontaneously reset the microcontroller from time to time, along with other erratic behaviors such as lockups on the I2C bus. The cure for motor noise is to filter using capacitors along the power rails, both close to the source of the noise and to the parts of the circuit that are misbehaving. There is an art and science to selecting capacitors for filtering based on the characteristics of the noise. However in this case, a temporary circuit on a breadboard, I'll confess to just adding capacitors until the problem went away.

October 15, 2013

Teach yourself the fundamentals of digital logic with the Deluxe Digital Logic Lab. The kit provides a generous assortment integrated circuits, transistors and other needed components. It is fully supported online at the Sully Station Technologies website with breadboard layouts, schematic diagrams, technical notes and datasheets. Build transistor logic gates, flip-flop memories, adders, counters, decoders, multiplexers and more.

Other Posts

Buster - A Voice Controlled Raspberry Pi Robot Arm
Buster is a fully voice interactive robot arm built around the Raspberry Pi. He acts upon commands given in spoken English and answers questions too.

Haar LBP and HOG - Experiments in OpenCV Object Detection
I've spent some time lately coming up-to-speed and playing with OpenCV - especially the object detection routines. Three that caught my eye for further investigation were Haar Cascades, Local Binary Patterns (LBP), and Histogram of Oriented Gradients (HOG).

Back to Basics
After spending quite a while exploring various approaches to walking robots and other mechanical conundrums, I'm turning my attention to machine learning and building a simple but robust platform to experiment with neural networks.

Migrating to the 1284P
The ATMEGA1284P is one of the more capable microcontrollers available in the hobbyist and breadboard-friendly 40-pin PDIP package. Here I discuss migrating the neural network project to the 1284p to take advantage of its relatively generous 16K RAM.

An Arduino Neural Network
An artificial neural network developed on an Arduino Uno. Includes tutorial and source code.

A Simple Machine Learning Experiment for the Artificial Neural Network
A very simple concept for getting started applying the network to a robot machine learning scenario. The test robot has three IR sensors and two bump switches. For the experiment, the robot will use the bump switches to register collisions, and based on those collisions will learn to avoid obstacles in the future.

Flexinol and other Nitinol Muscle Wires
With its unique ability to contract on demand, Muscle Wire (or more generically, shape memory actuator wire) presents many intriguing possibilities for robotics. Nitinol actuator wires are able to contract with significant force, and can be useful in many applications where a servo motor or solenoid might be considered.

Precision Flexinol Position Control Using Arduino
An approach to precision control of Flexinol contraction based on controlling the voltage in the circuit. In addition, taking advantage of the fact that the resistance of Flexinol drops predictably as it contracts, the mechanism described here uses the wire itself as a sensor in a feedback control loop.

LaunchPad MSP430 Assembly Language Tutorial
One of my more widely read tutorials. Uses the Texas Instruments LaunchPad with its included MSP430G2231 processor to introduce MSP430 assembly language programming.

K'nexabeast - A Theo Jansen Style Octopod Robot
K'nexabeast is an octopod robot built with K'nex. The electronics are built around a PICAXE microcontroller and it uses a leg structure inspired by Theo Jansen's innovative Strandbeests.