Hide thumbs Also See for A-Star 32U4 Series:

Advertisement

Quick Links

Pololu A-Star 32U4 User's Guide
© 2001–2018 Pololu Corporation
Pololu A-Star 32U4 User's
Guide
https://www.pololu.com/docs/0J61/all
Page 1 of 59

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Pololu A-Star 32U4 Series

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

    2. Contacting Pololu ........
  • Page 3: Overview

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation 1. Overview The Pololu A-Star 32U4 microcontroller boards are general-purpose programmable modules based Atmel’s ATmega32U4 microcontroller, which has 32 KB of flash program memory, 2.5 KB of RAM, and built-in USB functionality. Each A-Star (abbreviated A*)
  • Page 4 Pololu A-Star 32U4 User’s Guide © 2001–2018 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 Prime SV...
  • Page 5: Supported Operating Systems

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation 1.1. Supported operating systems The A-Star 32U4 boards 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 6: Contacting Pololu

    Pololu A-Star 32U4 User’s Guide © 2001–2018 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-Stars. You contact us directly or post on [https://www.pololu.com/contact] forum .
  • Page 7: A-Star 32U4 Micro

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation 3. A-Star 32U4 Micro A-Star 32U4 Micro, top view. 3.1. A-Star 32U4 Micro pinout and components Pinout The diagram above identifies the I/O and power pins on the A-Star 32U4 Micro; it is also available...
  • Page 8 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation documentation [https://www.microchip.com/wwwproducts/en/ATmega32u4] Printed on the A* circuit board are indicators that you can use to quickly identify each pin’s capabilities: a triangle next to the pin means it can be used as an analog input, and a square wave symbol under the pin number means it can be used as a PWM output.
  • Page 9: A-Star 32U4 Micro Schematic And Dimensions

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation if too much current is drawn from the USB connection. VIN power input: The A-Star can be powered from VIN if you connect a 5.5 V to 15 V power supply (such as a battery or wall power adapter) to the VIN and GND pins, with the positive terminal connected to VIN.
  • Page 10 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation Pololu A-Star 32U4 Micro schematic diagram. This schematic is also available as a PDF: A-Star 32U4 Micro schematic diagram (253k pdf). [https://www.pololu.com/file/0J742/pololu-a-star-32u4-micro-schematic-diagram.pdf] 3. A-Star 32U4 Micro Page 10 of 59...
  • Page 11 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation Dimension diagram A dimension diagram of the A-Star 32U4 Micro is available as a PDF: A-Star 32U4 Micro dimension diagram (255k pdf). [https://www.pololu.com/file/0J747/pololu-a-star-32u4-micro-dimension-diagram.pdf] 3. A-Star 32U4 Micro Page 11 of 59...
  • Page 12: A-Star 32U4 Mini

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation 4. A-Star 32U4 Mini A-Star 32U4 Mini ULV, LV, and SV. 4.1. A-Star 32U4 Mini pinout and components Pinout 4. A-Star 32U4 Mini Page 12 of 59...
  • Page 13 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation This diagram identifies the I/O and power pins on the A-Star 32U4 Mini (ULV, LV, and SV versions); it is also available as a printable PDF (223k [https://www.pololu.com/file/0J1515/a-star-32u4-mini-pinout.pdf] pdf). For more information about the ATmega32U4 microcontroller and its peripherals, see Atmel’s ATmega32U4 documentation.
  • Page 14 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation LED is connected to the pin labeled RXL (usable as 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 15: A-Star 32U4 Mini Ulv Regulator

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation • LV: 2.7 V to 11.8 V (see Section 4.3 for regulator details) • SV (see Section 4.4 for regulator details): ◦ original ac02c version: 5 V to 36 V ◦ newer ac02f version: 5 V to 40 V Reverse-protected power inputs: The BAT+ and BAT- pins are power inputs with reverse-voltage protection.
  • Page 16: A-Star 32U4 Mini Lv Regulator

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation The A-Star 32U4 Mini ULV can be powered from a 0.5 V to 5.5 V external source. The input voltage is regulated to 5 V by a TPS61202 switching step-up (boost) converter from Texas Instruments. (We also...
  • Page 17 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation The A-Star 32U4 Mini LV can be powered from a 2.7 V to 11.8 V external source. The input voltage is regulated to 5 V by a TPS63061 switching step-up/ step-down...
  • Page 18: A-Star 32U4 Mini Sv Regulators

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation few seconds. These currents represent the limit of the regulator’s capability and cannot be sustained for long periods; a good estimate for the maximum continuous regulator output current is 60% to 70% of the values shown in the graph.
  • Page 19 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation The A-Star 32U4 Mini SV (ac02f) is the newest version of the Mini SV, and it can be powered from a 5 V to 40 V external source. The input voltage is regulated to 5 V by an 800 mA ISL85418 switching step-down converter, which is part of the same family as the ISL85415.
  • Page 20: A-Star 32U4 Mini Schematic And Dimensions

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation The dropout voltage of a step-down regulator is defined as the minimum amount by which the input voltage much exceed the regulator’s target output voltage in order to assure the target output can be achieved.
  • Page 21 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation • A-Star 32U4 Mini SV dimension diagram [https://www.pololu.com/file/0J1512/a-star-32u4-mini-sv- (208k pdf) dimensions.pdf] 4. A-Star 32U4 Mini Page 21 of 59...
  • Page 22: A-Star 32U4 Prime

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation 5. A-Star 32U4 Prime A-Star 32U4 Prime SV microSD. A-Star 32U4 Prime LV microSD. 5.1. A-Star 32U4 Prime configurations The A-Star 32U4 Prime LV (blue solder mask, 2.7 V to 11.8 V operating voltage range) and SV (green solder mask, 5 V to 36 V operating voltage range) are each available in five different versions, allowing you to choose the right amount of customizability and features for your application.
  • Page 23 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation A-Star 32U4 Prime LV A-Star 32U4 Prime SV This version comes with all surface-mount components except for the microSD card connector and level shifters. These through-hole parts are also soldered in: •...
  • Page 24: A-Star 32U4 Prime Pinout And Components

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation For users wishing to populate some or all of the through-hole parts on an SMT-only version of the A-Star 32U4 Prime (or to add more functionality to another version), we offer an...
  • Page 25 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation This diagram identifies the I/O and power pins on the A-Star 32U4 Prime (LV and SV versions); it is also available (along with the power distribution diagram below) as a printable PDF (1MB pdf).
  • Page 26 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation Compatibility with Arduino shields and accessories The A-Star 32U4 Prime matches the Arduino Leonardo and the Arduino Uno R3 in the shape of its circuit board and the arrangement of its pins. Furthermore, it uses the same ATmega32U4...
  • Page 27 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation user 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 28 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation Buzzer The assembled versions of the A-Star 32U4 Prime come with a buzzer that can be used to generate simple sounds and music. The buzzer is not present on the SMT-only versions, but the buzzer driver circuit is still populated, allowing you to solder in your own buzzer or speaker.
  • Page 29 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation with no microSD card inserted can put the DO level shifter output into an undefined state. The CD (card detect) pin next to the connector can be used to detect the presence of a microSD card: it is floating when a card is inserted and shorted to ground when a card is not present.
  • Page 30 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation The AStar32U4PrimeLCD library provides functions to display data on a connected LCD. It is designed to gracefully handle alternate use of the LCD data lines by only changing pin states when needed for an LCD command, after which it will restore them to their previous states.
  • Page 31 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation The board also has a 6-pin ISP header that allows it to be programmed with an external programmer, such as our USB AVR programmer v2.1 . Pin 1 of the header is [https://www.pololu.com/product/3172]...
  • Page 32 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation The input voltage range of the regulator depends on the particular version of the A-Star 32U4 Prime: • LV: 2.7 V to 11.8 V (see Section 5.3 for regulator details) • SV: 5 V to 36 V (see Section 5.4...
  • Page 33: A-Star 32U4 Prime Lv Regulator

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation voltage (one-third on the LV, one-eighth on the SV), and this voltage can be read by connecting it to the adjacent analog pin 1 (A1) (or another analog input). The readBatteryMillivoltsLV()
  • Page 34: A-Star 32U4 Prime Sv Regulator

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation • A disposable 9 V battery powering the board can be discharged to under 3 V instead of cutting out at 6 V, as with typical linear or step-down regulators. As shown in the left graph below, the LV’s switching regulator has an efficiency – defined as (Power out)/(Power in) –...
  • Page 35 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation The A-Star’s components, including the microcontroller and LEDs, draw 30 mA to 40 mA in typical applications (without the buzzer, microSD card, or an LCD). The rest of the regulator’s achievable output current, which depends on input voltage as well as ambient conditions, can be used to power other devices.
  • Page 36: A-Star 32U4 Prime Schematic

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation Note: Although the ISL85410 is rated for a maximum operating input voltage of 36 V, it is not appropriate to power the Prime SV with a 36 V battery, as battery voltages can be much higher than nominal voltages when they are charged.
  • Page 37 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation When the demo program starts, you should see the words “A-Star Prime” and then “Demo Program” appear. If you do not see any text on the LCD, you may need to adjust the contrast potentiometer.
  • Page 38 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation computer. You can connect to the A-Star’s serial port using a standard terminal program or by using the Serial Monitor feature from the Tools menu in the Arduino IDE. Any characters you send to the A-Star will be displayed on the LCD, and information about the received characters will be sent back to the computer.
  • Page 39: 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 40 Pololu A-Star 32U4 User’s Guide © 2001–2018 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 41: 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 42 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 43 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 44 Pololu A-Star 32U4 User’s Guide © 2001–2018 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 45 Pololu A-Star 32U4 User’s Guide © 2001–2018 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. If this happens, try again. If you...
  • Page 46: Programming Using Avr-Gcc And Avrdude

    Pololu A-Star 32U4 User’s Guide © 2001–2018 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”...
  • Page 47 Pololu A-Star 32U4 User’s Guide © 2001–2018 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: avr-gcc -v...
  • Page 48 Pololu A-Star 32U4 User’s Guide © 2001–2018 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 49: A-Star 32U4 Arduino Library

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation 7. A-Star 32U4 Arduino library The A-Star 32U4 can be programmed from the Arduino IDE as described in the preceding sections. To help interface with all the on-board hardware on the A-Star 32U4, we provide the AStar32U4 library.
  • Page 50: 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 51 Pololu A-Star 32U4 User’s Guide © 2001–2018 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. On a Linux computer, you can see details about the USB interface by running lsusb -v -d 1ffb: a Terminal.
  • Page 52: The A-Star 32U4 Bootloader

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation 9. The A-Star 32U4 Bootloader Our 32U4 family of boards come with a USB bootloader that can be used in conjunction with the Arduino IDE or AVRDUDE to load new programs onto the device. This section documents some technical details of the bootloader for advanced users who want to better understand how it works.
  • Page 53 Pololu A-Star 32U4 User’s Guide © 2001–2018 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 54 Pololu A-Star 32U4 User’s Guide © 2001–2018 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 55: Reviving An Unresponsive A-Star

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation 10. 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 56 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 57: 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 58 Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation using the command-line utility AVRDUDE in case your usual method of [http://www.nongnu.org/avrdude/] programming is not working. 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.
  • Page 59: Related Resources

    Pololu A-Star 32U4 User’s Guide © 2001–2018 Pololu Corporation 11. Related Resources To learn more about using the Pololu A-Star boards, see the following list of resources: • The Arduino IDE has many examples that can run on the [http://arduino.cc/en/Tutorial/HomePage] A-Stars.

Table of Contents