beautypg.com

C. motors and gearboxes – Pololu 3pi Robot User Manual

Page 13

background image

A typical small brushed DC

motor, with no gearbox.

One other interesting thing about this power system is that instead of gradually running out of power like most robots,
the 3pi will operate at maximum performance until it suddenly shuts off. This can take you by surprise, so you might
want your 3pi to monitor its battery voltage.

A simple circuit for monitoring battery voltage is built in to the 3pi. Three
resistors, shown in the circuit at right, comprise a voltage divider that outputs a
voltage equal to two-thirds of the battery voltage, which will always be safely
below the main microcontroller’s maximum analog input voltage of 5 V. For
example, at a battery voltage of 4.8 V, the battery voltage monitor port ADC6
will be at a level of 3.2 V. Using 10-bit analog-to-digital conversion, where 5 V is
read as a value of 1023, 3.2 V is read as a value of 655. To convert it back to the
actual battery voltage, multiply this number by 5000 mV×3/2 and divide by
1023. This is handled conveniently by the

read_battery_millivolts_3pi()

function (provided in the Pololu AVR Library; see

Section 6

for more

information), which averages ten samples and returns the battery voltage in mV:

unsigned int read_battery_millivolts_3pi()

{

return readAverage(6,10)*5000L*3/2/1023;

}

5.c. Motors and Gearboxes

A motor is a machine that converts electrical energy to motion. There are
many different kinds of motors, but the most important for low-cost robotics
is the brushed DC motor, which is the type used on the 3pi. A brushed DC
motor typically has permanent magnets on the outside and several
electromagnetic coils mounted on the motor shaft (armature). The “brushes”
are sliding pieces of metal that switch the power from one coil to the next as
the shaft turns so that magnetic attraction between the coil and the magnets
continuously pulls the motor in the same direction.

The primary values that describe a running motor are its speed, measured in
rpm, and its torque, measured in kg·cm or oz·in (pronounced “ounce-
inches”). The units for torque show the dependence on both force and
distance; for example, a motor that produces 6 oz·in of torque can product a
force of 6 oz. with a 1-inch lever arm, 3 oz. with a 2-inch lever, and so on.
Multiplying the torque and speed (measured at the same time) give us the
power delivered by a motor. We see, therefore, that a motor with twice the speed and half the torque as another has the
same power output.

Every motor has a maximum speed (when no force is applied) and a maximum torque (when the motor is completely
stopped). We call these the free-running speed and the stall torque. Naturally, a motor uses the least current when no
force is applied to it, and the current drawn from the batteries goes up until it stalls, so the free-running current and
stall current are also important parameters characterizing the motor. The stall current is usually much higher than the
free-running current, as shown in the graph below:

Pololu 3pi Robot User's Guide

© 2001–2014 Pololu Corporation

5. How Your 3pi Works

Page 13 of 63