Pololu Balboa 32U4 Manual de usuario

Pololu Balboa 32U4 Balancing
Robot User’s Guide
Pololu Balboa 32U4 Balancing Robot User’s Guide © 2001–2019 Pololu Corporation
https://www.pololu.com/docs/0J70/all Page 1 of 97

1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Included components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2. What you will need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3. Supported operating systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2. Contacting Pololu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3. Balboa 32U4 in detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.1. Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2. User interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3. Motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.4. Quadrature encoders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.5. Inertial sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.6. Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.7. xpansion headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.8. Raspberry Pi interface and level shifters . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.9. Pin assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.10. Adding electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.11. AVR timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.12. Bumper cage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.13. Stability Conversion Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.14. Schematics and dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4. Assembling the Balboa 32U4 kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5. Programming the Balboa 32U4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.1. Installing Windows drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.2. Programming using the Arduino ID . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.3. Programming using avr-gcc and AVRDUD . . . . . . . . . . . . . . . . . . . . . . . 74
6. Balboa 32U4 Arduino library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7. How to make a Balboa balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
7.1. Sensor measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
7.2. An example balancing algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
8. The Balboa 32U4 USB interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
9. The A-Star 32U4 Bootloader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
10. Reviving an unresponsive Balboa 32U4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
10.1. Reviving using the Arduino ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
10.2. Reviving using AVRDUD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
11. Related resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Pololu Balboa 32U4 Balancing Robot User’s Guide © 2001–2019 Pololu Corporation
Page 2 of 97

1. Overview
The Balboa 32U4 is a highly integrated balancing robot that is both programmable and customizable.
Like our A-Star 32U4 programmable controllers [https://www.pololu.com/category/149/a-star-
programmable-controllers], the Balboa 32U4 control board is built around a USB-enabled Atmel
ATmega32U4 AVR microcontroller, and it ships preloaded with an Arduino-compatible bootloader. The
control board features two H-bridge motor drivers, as well as quadrature encoders and a complete
inertial measurement unit (accelerometer, gyro, and magnetometer) that allows it to determine its
orientation – essential for balancing. It also includes a powerful 5 V switching step-down regulator that
can supply up to 2 A continuously, along with a versatile power switching and distribution circuit. Three
on-board pushbuttons offer a convenient interface for user input, while indicator L Ds, a buzzer, and
a connector for an optional LCD allow the robot to provide feedback.
The Balboa 32U4 can be used either as a standalone control solution or as a base for a more powerful
Raspberry Pi controller. Its on-board connector and mounting holes allow a compatible Raspberry
Pi (Model B+ or newer, including Pi 3 Model B [https://www.pololu.com/product/2759] and Model A+
[https://www.pololu.com/product/2760]) to plug directly into the control board. Integrated level shifters make
it easy to set up I²C communication and interface other signals between the two controllers, and
the control board automatically supplies 5 V power to an attached Raspberry Pi. In this setup, the
Raspberry Pi can handle the high-level robot control while relying on the Balboa 32U4 control board
for low-level tasks, like running motors, reading encoders, and interfacing with other analog or timing-
sensitive devices.
Pololu Balboa 32U4 Balancing Robot User’s Guide © 2001–2019 Pololu Corporation
1. Overview Page 3 of 97

Balboa 32U4 Balancing Robot with
80×10mm wheels and a Raspberry Pi 1
Model A+. Balboa 32U4 Balancing Robot with
80×10mm wheels and a Raspberry Pi 3
Model B.
Many of the ATmega32U4 I/O lines are broken out to 0.1″-spaced through-holes along the edges of
the board, and the board’s power rails are also accessible, enabling sensors and other peripherals to
easily be connected.
A software add-on is available that makes it easy to program a Balboa 32U4 robot from the Arduino
environment, and we have Arduino libraries and example sketches to help get you started. A USB A
to Micro-B cable [https://www.pololu.com/product/2072] (not included) is required for programming.
1.1. ncluded components
Pololu Balboa 32U4 Balancing Robot User’s Guide © 2001–2019 Pololu Corporation
1. Overview Page 4 of 97

The Balboa 32U4 is available
as a kit [https://www.pololu.com/
product/3575] that requires
assembly and soldering. The
kit includes the following
components:
• Balboa core chassis
◦ battery box and cover
◦ two motor retention clips/
gearbox housings
◦ two gearbox covers
◦ six 683 ball bearings
◦ two 3 mm D-shafts
◦ ten plastic pinion gears (small
– two each with 17, 19, 21, 23,
and 25 teeth)
◦ ten plastic output gears (large
– two each with 41, 43, 45, 47,
and 49 teeth)
◦ battery terminals
•Balboa 32U4 control board
[https://www.pololu.com/product/3576] and
related parts:
◦buzzer [https://www.pololu.com/
product/1484]
Pololu Balboa 32U4 Balancing Robot User’s Guide © 2001–2019 Pololu Corporation
1. Overview Page 5 of 97

◦ jumper wires (for soldering motors to the main board)
◦ two magnetic encoder discs [https://www.pololu.com/product/2599] (12 CPR)
◦ four 3/16″ #2-56 screws and nuts
•bumper cage kit [https://www.pololu.com/product/3574], which includes:
◦ four bumper skids
◦ four bumper cage cross bars
◦ two bumper skid spacers
◦ twelve 12 mm M3 screws and nuts
Pololu Balboa 32U4 Balancing Robot User’s Guide © 2001–2019 Pololu Corporation
1. Overview Page 6 of 97

Pololu Balboa 32U4 Balancing Robot User’s Guide © 2001–2019 Pololu Corporation
1. Overview Page 7 of 97

The robot and chassis kit might include extra parts like jumper wires, screws, and nuts,
so do not be concerned if you have some leftover hardware after assembling your
Balboa.
1.2. What you will need
You will need a number of additional components and tools to complete your Balboa robot, the most
important of which are motors and wheels. Since the Balboa 32U4 robot kit works with a variety of
motors and wheels, motors and wheels are not included; this means you can choose your own to
personalize your robot.
Motor selection
Pololu Balboa 32U4 Balancing Robot User’s Guide © 2001–2019 Pololu Corporation
1. Overview Page 8 of 97

A look inside the external
gearbox on the Balboa 32U4
Balancing Robot.
The Balboa uses two micro metal gearmotors to drive external
2-gear gearboxes that further increase the gear ratio and support
the weight of the robot with ball bearings rather than the motor
shafts themselves. The Balboa kit gives you five reduction options
to choose from when assembling your robot (ranging from 1.64:1
to 2.88:1), and you can further customize the gear ratio based on
which micro metal gearmotor you choose for your robot. The
integrated quadrature encoders require gearmotors with
extended motor shafts, and we specifically recommend the 30:1
HPCB [https://www.pololu.com/product/3072],50:1 HPCB
[https://www.pololu.com/product/3073], or 75:1 HPCB
[https://www.pololu.com/product/3074] versions. Note that torque is
approximately proportional to the gear ratio and speed is
inversely proportional, so as the gear ratio gets bigger, the torque
increases while the speed decreases.
Micro metal gearmotor HPCB with
extended motor shaft.
The kit includes magnetic encoder discs, and the encoder sensors are built into the Balboa 32U4
control board, so you do not need to order encoders with your motors.
Wheel selection
We recommend using the Balboa with 80×10mm Pololu wheels, which are available in five colors
—black [https://www.pololu.com/product/1430],red [https://www.pololu.com/product/1431],yellow
[https://www.pololu.com/product/1432],blue [https://www.pololu.com/product/1433], and white
[https://www.pololu.com/product/1434] — but our larger 90×10mm wheels [https://www.pololu.com/product/
1435] and smaller 70×8mm wheels [https://www.pololu.com/product/1425] are also options if you know
what you are doing (note that the 70×8mm wheels only offer a few millimeters of clearance when the
robot is balancing).
Pololu Balboa 32U4 Balancing Robot User’s Guide © 2001–2019 Pololu Corporation
1. Overview Page 9 of 97

Balboa 32U4 Balancing Robot with battery cover
removed.
Pololu wheel 80×10mm pair – red.
These additional items are also needed for using and assembling the Balboa 32U4 robot kit:
Other things you will need
• six AA batteries [https://www.pololu.com/
product/1003]. The Balboa works with
both alkaline and NiMH batteries,
though we recommend rechargeable
NiMH cells.
•USB A to Micro-B cable
[https://www.pololu.com/product/2072] to
connect the board to your computer for
programming and debugging
• soldering iron and solder (we
recommend one with adjustable
temperature control like the Hakko
FX-888D Digital Soldering Station
[https://www.pololu.com/product/2779])
• small Phillips screwdriver
•wire cutter [https://www.pololu.com/
product/159] for trimming leads
Optional tools
•small pair of pliers [https://www.pololu.com/product/150]
•wire stripper [https://www.pololu.com/product/1923], for adding wires for peripherals
Pololu Balboa 32U4 Balancing Robot User’s Guide © 2001–2019 Pololu Corporation
1. Overview Page 10 of 97
Tabla de contenidos
Otros manuales de Robótica de Pololu
Manuales populares de Robótica de otras marcas

STEMCenter USA
STEMCenter USA Pi-Bot v2.00 Manual de usuario

SunFounder
SunFounder PiDog Manual de usuario

Universal Robots
Universal Robots UR5 Manual de usuario

Universal Robots
Universal Robots E Series Manual de usuario

YASKAWA
YASKAWA MOTOMAN-MPL80 II Manual de usuario

EFORT
EFORT ECR5 Manual de instrucciones















