a larger motor driver.
• Second, since the voltage is regulated, the motors will run the same speed as the batteries
drop from 5.5 down to 3.5 V. You can take advantage of this when programming your 3pi, for
example by calibrating a 90° turn based on the amount of time that it takes.
• Third, at 9.25 V, all five of the IR LEDs can be powered in series so that they consume the
lowest possible amount of power. (Note that you can switch the LEDs on and off to save even
more power.)
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
for more information), which averages ten samples and returns the battery
voltage in mV:
5.c. Motors and Gearboxes
1
2
3
4
unsigned
int
read_battery_millivolts_3pi()
{
return
readAverage(6,10)*5000L*3/2/1023;
}
Pololu 3pi Robot User’s Guide
© 2001–2019 Pololu Corporation
5. How Your 3pi Works
Page 15 of 85
Содержание 0J5840
Страница 24: ...Pololu 3pi Robot User s Guide 2001 2019 Pololu Corporation 5 How Your 3pi Works Page 24 of 85...
Страница 67: ...Source code Pololu 3pi Robot User s Guide 2001 2019 Pololu Corporation 10 Expansion Information Page 67 of 85...
Страница 77: ...Source code Pololu 3pi Robot User s Guide 2001 2019 Pololu Corporation 10 Expansion Information Page 77 of 85...