Pololu A-Star 32U4 User Manual

Robot controller
Hide thumbs Also See for A-Star 32U4:

Advertisement

Quick Links

Pololu A-Star 32U4 Robot Controller User's Guide
© 2001–2019 Pololu Corporation
Pololu A-Star 32U4 Robot
Controller User's Guide
https://www.pololu.com/docs/0J66/all
Page 1 of 50

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the A-Star 32U4 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Pololu A-Star 32U4

  • Page 1 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation Pololu A-Star 32U4 Robot Controller User’s Guide https://www.pololu.com/docs/0J66/all Page 1 of 50...
  • Page 2: Table Of Contents

    6. The A-Star 32U4 USB interface ....... . . 41...
  • Page 3: Overview

    We provide a software add-on that enables it to be easily programmed from the Arduino environment, as well as an Arduino library to help interface with its on-board hardware. USB A to Micro-B cable (not included) is required [https://www.pololu.com/product/2072] to connect the A-Star 32U4 Robot Controller to a computer. 1. Overview Page 3 of 50...
  • Page 4 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation Features • Dimensions: 65 mm × 56 mm (2.6″ × 2.2″) • Programmable ATmega32U4 MCU with 32 KB flash, 2.5 KB SRAM, 1 KB EEPROM, and native full-speed USB (clocked by precision 16 MHz crystal oscillator) •...
  • Page 5 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation A-Star comparison table A-Star 32U4 Mini A-Star 32U4 A-Star 32U4 Robot Prime LV Controller LV A-Star 328PB A-Star 32U4 A-Star 32U4 Mini Micro Micro A-Star 32U4 A-Star 32U4 Robot...
  • Page 6: Supported Operating Systems

    © 2001–2019 Pololu Corporation 1.1. Supported operating systems The A-Star 32U4 Robot Controller can be programmed using any operating system that supports the Arduino environment. We have tested the A-Stars, our Arduino software add-on, and the Arduino IDE on Microsoft Windows 10, 8.1, 8, 7, Vista, XP (with Service Pack 3), Linux, and Mac OS X.
  • Page 7: Contacting Pololu

    Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation 2. Contacting Pololu We would be delighted to hear from you about any of your projects and about your experience with the Pololu A-Star Robot Controller. You can contact us directly or post [https://www.pololu.com/contact]...
  • Page 8: A-Star 32U4 Robot Controller With Raspberry Pi Bridge

    , which allows it to be easily programmed using the [https://www.pololu.com/docs/0J66/7] Arduino IDE. For more information about programming the A-Star 32U4 Robot Controller, see Section The board also has a 6-pin ISP header that allows it to be programmed with an external programmer,...
  • Page 9 LED is connected to Arduino pin 17, or PB0, and lights when the pin is driven low. While the board is running the A-Star 32U4 Bootloader or a program compiled in the Arduino environment, it will flash this LED when it is receiving data via the USB connection.
  • Page 10: Motor Drivers

    USB bus voltage (VBUS) is present. Pushbuttons The A-Star 32U4 Robot Controller has four pushbuttons: a reset button on the right edge and three user pushbuttons located along the bottom edge of the main board. The user pushbuttons, labeled A, B, and C, are on Arduino pin 14 (PB3), PD5, and Arduino pin 17 (PB0), respectively. Pressing one of these buttons pulls the associated I/O pin to ground through a resistor.
  • Page 11 [https://www.pololu.com/product/965] or motor wires can be soldered directly to either set of holes. Driving motors with an A-Star 32U4 Robot Controller LV with Raspberry Pi Bridge on a Raspberry Pi Model B+ or Pi 2 Model B. Although the LV and SV versions of the robot controller use different driver ICs, the motor driver interface is identical between the two versions.
  • Page 12: Motor Drivers

    3.4. SV motor drivers The A-Star 32U4 Robot Controller SV features two Maxim MAX14870 motor drivers that can each deliver a continuous 1.7 A (2.5 A peak). The motor power supply is derived from an external source connected to the A-Star’s Power In terminals, which also feeds the on-board voltage regulator and...
  • Page 13 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation Driving motors with an A-Star 32U4 Robot Controller SV with Raspberry Pi Bridge on a Raspberry Pi Model B+ or Pi 2 Model B. Although the LV and SV versions of the robot controller use different driver ICs, the motor driver interface is identical between the two versions.
  • Page 14: Power

    3.5. Power The A-Star 32U4 Robot Controller can be powered from an external voltage source, which is regulated to 5 V by its on-board switching regulator; the provided voltage is also used to supply the motor drivers directly.
  • Page 15 5V regulator VIN supplies power to a 5 V regulator, whose output is designated VREG. The allowable input voltage range depends on the particular version of the A-Star 32U4 Robot Controller: • LV: 2.7 V to 11 V (see Section 3.6 for regulator details) •...
  • Page 16: Regulator

    An ideal diode circuit on the A* makes it safe to have a different power supply connected to the Raspberry Pi (for example, through the Raspberry Pi’s USB Micro-B receptacle) while the A-Star 32U4 Robot Controller is connected and powered. (In other words, it is safe to have any combination of A- Star USB power, A-Star external power, and Raspberry Pi USB power connected to the system.) The...
  • Page 17 These currents represent the limit of the regulator’s capability and cannot be sustained 3. A-Star 32U4 Robot Controller with Raspberry Pi Bridge Page 17 of 50...
  • Page 18: Regulator

    As can be seen in the graph below, the dropout voltage of the Robot Controller SV’s regulator increases approximately linearly with the output current. For light loads where the dropout 3. A-Star 32U4 Robot Controller with Raspberry Pi Bridge Page 18 of 50...
  • Page 19: Raspberry Pi Interface And Level Shifters

    A-Star’s power switch is off before connecting it to a voltage source. 3.8. Raspberry Pi interface and level shifters The A-Star 32U4 Robot Controller with Raspberry Pi Bridge can be used as an expansion board on top of a Raspberry Pi single-board computer. It conforms to the Raspberry Pi HAT (Hardware...
  • Page 20 Raspberry Pi. 3. A-Star 32U4 Robot Controller with Raspberry Pi Bridge Page 20 of 50...
  • Page 21 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation Raspberry Pi robot using the A-Star 32U4 Robot Controller. General-purpose level shifters In addition to the dedicated I²C level shifters, the A-Star board also makes available a few general- purpose level shifters that are not connected to any signals by default.
  • Page 22: Pinout

    “WP” next to the EEPROM chip. (The EEPROM is not write-protected by default.) 3.9. Pinout These diagrams identify the I/O and power pins on the A-Star 32U4 Robot Controller with Raspberry Pi Bridge (LV and SV versions); they are also available (along with the power distribution diagram below)
  • Page 23 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation peripherals, see Atmel’s ATmega32U4 documentation. 3. A-Star 32U4 Robot Controller with Raspberry Pi Bridge Page 23 of 50...
  • Page 24 AREF and PD5. You can configure each bus separately by using a jumper to connect it to a voltage source of your choice. (Access points for various supply voltages are available nearby.) 3. A-Star 32U4 Robot Controller with Raspberry Pi Bridge Page 24 of 50...
  • Page 25: Pin Assignments

    4. Also, due to hardware limitations, some functions only work on a limited set of pins. The “A-Star 32U4 Robot Controller functions” column documents what the pin is used for on the A- Star 32U4 Robot Controller. Many pins can serve multiple purposes concurrently by switching modes.
  • Page 26 Free I/O Analog input (ADC6) A1, 19 Jumper to battery level input (VIN/3) JTAG test data out (TDO) UART receive pin (RXD1) Free I/O External interrupt source (INT2) 3. A-Star 32U4 Robot Controller with Raspberry Pi Bridge Page 26 of 50...
  • Page 27 JTAG test clock (TCK) A4, 22 Free I/O Analog input (ADC1) A5, 23 Free I/O Analog input (ADC0) RESET Reset pushbutton internally pulled high, active low AREF Analog reference 3. A-Star 32U4 Robot Controller with Raspberry Pi Bridge Page 27 of 50...
  • Page 28: Avr Timers

    • Timer1 is used by the A-Star 32U4 Arduino library for driving motors. • Timer3 is not used by the A-Star 32U4 Arduino library and can be freely used for your own purposes. • Timer4 is used by the A-Star 32U4 Arduino library for controlling the buzzer. The Buzzer pin must be connected to the adjacent digital pin 6 (PD7;...
  • Page 29 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation (188k dxf) [https://www.pololu.com/file/0J1121/ac04b-drill.dxf] • A-Star 32U4 Robot Controller with Raspberry Bridge drill guide (197k dxf) [https://www.pololu.com/file/0J1122/ac04c-drill.dxf] 3. A-Star 32U4 Robot Controller with Raspberry Pi Bridge Page 29 of 50...
  • Page 30: Getting Started

    Service Pack 3, so we recommend Service Pack 3 over the hotfix. Before you connect your Pololu A-Star 32U4 (or another of our 32U4 family of boards) to a computer running Microsoft Windows, you should install its drivers: 1.
  • Page 31 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation 4. Windows will not tell you when the installation is complete, but it should be done after a few seconds. Windows 10, Windows 8, Windows 7, and Windows Vista users: After installing the drivers, your computer should automatically recognize the device when you connect it via USB.
  • Page 32: Programming Using The Arduino Ide

    After installing the drivers and plugging in an A-Star, in the “Ports (COM & LPT)” category of the Device Manager, you should see a COM port for the A-Star’s running sketch named “Pololu A-Star 32U4”. You might see that the COM port is named “USB Serial Device” in the Device Manager instead of having a descriptive name.
  • Page 33 URL on a new line. Adding a Boards Manager index for Pololu boards in the Arduino IDE’s Preferences dialog. 3. Click the “OK” button to close the Preferences dialog.
  • Page 34 7. After the installation finishes, click the “Close” button to close the Boards Manager dialog. 8. In the Tools > Board menu, select the “Pololu A-Star 32U4” entry. If you do not see your device listed in the Board menu, try restarting the Arduino IDE.
  • Page 35 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation Windows 10 Device Manager showing the A-Star’s virtual COM port. 10. Open up the “Blink” Arduino example, which can be found under File > Examples > 01.Basics > Blink. The code in this example will blink the yellow LED. When you select the Blink example, a new Arduino IDE window will open up.
  • Page 36 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation USB port, then Windows might take several seconds to recognize the A-Star bootloader. The bootloader times out after 8 seconds and goes back to running the sketch, so the upload might fail if Windows does not recognize it quickly enough.
  • Page 37: Programming Using Avr-Gcc And Avrdude

    © 2001–2019 Pololu Corporation the LED. The A-Star 32U4 boards are similar enough to the Arduino Leonardo that you do not actually have to install the add-on. If you want to, you can just select the “Arduino Leonardo” board in the Arduino IDE. Note that if you upload a sketch to the device this way, your computer will then recognize it as a Leonardo (for example, its entry in the Windows Device Manager will display “Arduino Leonardo”).
  • Page 38 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation sudo apt-get install gcc-avr avr-libc avrdude After you have installed the prerequisites, open a command prompt and try running these commands to make sure all the required utilities are available:...
  • Page 39 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation In Windows, should work if the A-Star is the only USB device connected that is \\\\.\\USBSER000 using the usbser.sys driver, but you can change it to be the actual name of the COM port (e.g.
  • Page 40: A-Star 32U4 Arduino Library

    [https://pololu.github.io/a- star-32u4-arduino-library/] If you are using the A-Star 32U4 Robot Controller as a Raspberry Pi add-on, you might also want to make use of our Raspberry Pi slave library for Arduino [https://github.com/pololu/pololu-rpi-slave-arduino- , which sets up the A-Star as an I²C slave and helps establish communication with a Raspberry library] Pi master.
  • Page 41: The A-Star 32U4 Usb Interface

    On a Windows computer, you can see the virtual serial port by going to your computer’s Device Manager and expanding the “Ports (COM & LPT)” list. You should see a COM port labeled “Pololu A- Star 32U4”. In parentheses after the name, you will see the name of the port (e.g. “COM3” or “COM4”).
  • Page 42 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation 32U4” COM port. Near it, you should see the parent composite device. The Windows 10 Device Manager in “Devices by connection” mode, showing that the A-Star is a composite device.
  • Page 43: The A-Star 32U4 Bootloader

    The A-Star 32U4 Bootloader has different startup logic that allows you to use the RST line to reset the board with a smaller delay. If the RST line goes low once, the user program will run after a 750 ms delay.
  • Page 44 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation The startup logic for the A-Star 32U4 bootloader. Brown-out detection Unlike many other ATmega32U4 boards, our 32U4 family of boards have brown-out detection enabled. The brown-out threshold is 4.3 V, and if the voltage on VCC goes below this then the AVR will reset.
  • Page 45 Pololu A-Star 32U4 Robot Controller User’s Guide © 2001–2019 Pololu Corporation The bootloader was designed so that the user program can detect brown-out resets. To do so, check to see if the BORF bit in the MCUSR register is set, and then clear it later. Here is some example code...
  • Page 46: Reviving An Unresponsive A-Star

    8. Reviving an unresponsive A-Star In order to load a new program onto your A-Star 32U4 device, you will need to get it into bootloader mode and send programming commands to it over its virtual serial port using appropriate software. If...
  • Page 47 1. Connect the device to your computer via USB. 2. In the “Tools” menu, open the “Board” sub-menu and check to see if the “Pololu A-Star 32U4 (bootloader port)” entry is visible. If this entry is visible, you can skip to step 6.
  • Page 48: Reviving Using Avrdude

    Blink example that can be found under File > Examples > 01.Basics > Blink. After reviving your device, be sure to change the Board setting back to “Pololu A-Star 32U4” and select the right Port.
  • Page 49 AVRDUDE stands for “AVR Downloader/UploaDEr”, and it is compatible with the A-Star bootloader. If you have an A-Star 32U4 Micro, you should connect a momentary pushbutton between the GND and RST pins to serve as a reset button. Other [https://www.pololu.com/product/1400]...
  • Page 50: Related Resources

    • AVRDUDE [http://www.nongnu.org/avrdude/] • AVR Freaks [http://www.avrfreaks.net/] Datasheets for some of the components found on the A-Star 32U4 boards are available below (not all components apply to every board): • Texas Instruments TPS2113A power multiplexer datasheet [https://www.pololu.com/file/ (1MB pdf) 0J771/tps2113a.pdf] •...

Table of Contents