Pololu A-Star 32U4 User Manual

Pololu A-Star 32U4 User’s Guide © 2001–2014 Pololu Corporation
Pololu A-Star 32U4 User’s Guide
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Supported operating systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Contacting Pololu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. A-Star 32U4 Micro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1. A-Star 32U4 Micro pinout and components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2. A-Star 32U4 Micro schematic and dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4. A-Star 32U4 Mini . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1. A-Star 32U4 Mini pinout and components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2. A-Star 32U4 Mini ULV regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.3. A-Star 32U4 Mini LV regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.4. A-Star 32U4 Mini SV regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.5. A-Star 32U4 Mini schematic and dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5. Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.1. Installing Windows drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.2. Programming using the Arduino IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3. Programming using avr-gcc and AVRDUDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6. The A-Star 32U4 USB interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7. The A-Star 32U4 Bootloader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
8. Reviving an unresponsive A-Star . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.1. Reviving using the Arduino IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.2. Reviving using AVRDUDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
9. Related Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
http://www.pololu.com/docs/0J61/all Page 1 of 30
Pololu A-Star 32U4 User’s Guide © 2001–2014 Pololu Corporation

1. Overview

The Pololu A-Star 32U4 family of products.
The Pololu A-Star 32U4 microcontroller boards are general-purpose programmable modules based on Atmel’s ATmega32U4 AVR microcontroller, which has 32 KB of flash program memory, 2.5 KB of RAM, and built­in USB functionality. Each A-Star (abbreviated A*) adds onboard components and connectors that support the microcontroller and make it easier to use. The boards feature USB interfaces and ship with a preloaded Arduino­compatible bootloader, and we provide a software add-on that enables them to be easily programmed from the Arduino environment. The following sections of this user’s guide discuss each A-Star in more detail.
A USB A to Micro-B cable [http://www.pololu.com/product/2072] (not included) is required to connect an A-Star 32U4 to a computer.

Features

• Programmable 16 MHz Atmel ATmega32U4 AVR microcontroller ◦ 32 KB flash (4 KB used by bootloader, leaving 28 KB available for user program by default)
◦ 2.5 KB SRAM
◦ 1 KB EEPROM
◦ Native full-speed USB (12 Mbps)
• Preloaded with Arduino-compatible bootloader
• Can be powered from USB or external source regulated to 5 V by onboard regulator
• Reverse-voltage protection on external power input
• 6-pin ISP header for use with an external programmer [http://www.pololu.com/product/1300]

A-Star comparison table

1. Overview Page 2 of 30
Pololu A-Star 32U4 User’s Guide © 2001–2014 Pololu Corporation
A-Star 32U4
Micro
Microcontroller: ATmega32U4 ATmega32U4
User I/O lines: 15
PWM outputs: 7 7
Analog inputs: 8 12
User LEDs: 2 3
Reset button:
Operating voltage:
Regulator type: linear switching step-up
Regulated current2:
Dimensions: 1″ × 0.6″ 1.9″ × 0.7″
Weight3: 1.3 g 3.4 g
1
Three extra digital I/O lines are accessible through the ISP header.
2
These values are rough approximations for comparison purposes. Available current depends on input voltage, current consumed by the board, ambient conditions, and regulator topology. See product documentation and performance graphs for details.
3
Without included optional headers.
1
5.5 V to 15 V 0.5 V to 5.5 V 2.7 V to 11.8 V 5 V to 36 V
100 mA 500 mA 1000 mA 500 mA
A-Star 32U4 Mini
ULV A-Star 32U4 Mini LV
switching step-up/step-
26
down
A-Star 32U4 Mini
SV
switching step-down

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 8.1, 8, 7, Vista, XP (with Service Pack 3), Linux, and Mac OS X.
1. Overview Page 3 of 30
Pololu A-Star 32U4 User’s Guide © 2001–2014 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 can contact us
[http://www.pololu.com/contact] directly or post on our forum [http://forum.pololu.com/]. Tell us what we did well, what we could improve,
what you would like to see in the future, or anything else you would like to say!
2. Contacting Pololu Page 4 of 30
Pololu A-Star 32U4 User’s Guide © 2001–2014 Pololu Corporation

3. A-Star 32U4 Micro

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 as a printable
PDF [http://www.pololu.com/file/download/a-star-32u4-micro-pinout.pdf?file_id=0J796] (409k pdf). For more information about
the ATmega32U4 microcontroller on this board, see Atmel’s ATmega32U4 documentation [http://www.atmel.com/
devices/atmega32u4.aspx].
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.

LEDs

The A-Star 32U4 Micro has two indicator LEDs.
The yellow LED is connected to Arduino pin 13, or PC7. You can drive this pin high in a user program to turn this LED on. The A-Star 32U4 Bootloader [http://www.pololu.com/docs/0J61/7] fades this LED on and off while it is waiting for a sketch to be loaded.
The green LED is connected to PD5 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 transmitting data via the USB connection.

Connectors

The A-Star 32U4 includes a USB Micro-B connector that can be used to connect to a computer’s USB port via a USB
A to Micro-B cable [http://www.pololu.com/product/2072] (not included). The USB connection can be used to transmit
3. A-Star 32U4 Micro Page 5 of 30
Pololu A-Star 32U4 User’s Guide © 2001–2014 Pololu Corporation
and receive data from the computer, and a preloaded USB bootloader makes it possible to program the board over USB. The USB connection can also provide power to the A-Star.
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 [http://www.pololu.com/product/1300]. Pin 1 of the header is indicated with a small white dot and
has an octagonal shape. Three of the pins on this header can be used as an SPI interface or as general-purpose digital I/O, as shown in the pinout diagram. In the Arduino environment, you can refer to these three pins using either their pin numbers or the names of their SPI functions (which are defined as aliases); for example, digitalRead(15) and
digitalRead(SCK) are equivalent.

Power

The A-Star 32U4 Micro can either be powered directly from the USB 5 V supply or from a separate source on the VIN pin. The board features a power selection circuit that allows both USB and VIN to be connected at the same time; if this is done, the A-Star will draw power from VIN.
USB power input: The A-Star can be powered from the USB 5 V bus voltage (VBUS) if it is connected to a USB cable. It will draw power from USB only if VIN is disconnected. A resettable PTC fuse on VBUS makes it less likely for the A-Star (and the connected computer or other device) to be damaged 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.
When powering the A-Star 32U4 Micro from VIN, a minimum voltage of 5.5 V is required to ensure that the board’s 5 V supply is stable. Even if power is being provided to the A-Star via USB, connecting a voltage higher than 0 V but lower than 5.5 V to VIN is not recommended, as this can interfere with the power selection circuit and cause the 5 V line to drop (potentially triggering a brown-out reset).
5V power output: This pin provides access to the board’s 5 V supply, which comes from either the USB 5 V bus voltage or a low-dropout (LDO) regulator on VIN, depending on which power source is connected. The regulator can supply up to 100 mA, although some of this is used by the board itself (typically about 25 mA) or used to provide current for the GPIO pins or 3.3 V power output (see below).
3V3 power output: This pin gives access to the output of the internal 3.3 V regulator inside the ATmega32U4. The microcontroller uses this regulated voltage for USB signaling, but up to about 50 mA is available for powering external circuits or devices.
When the A-Star 32U4 Micro is being powered through VIN, the sum of the 5V output current, 3V3 output current, GPIO output current, and current used by the board itself should not exceed the 100 mA that the regulator can provide.
3. A-Star 32U4 Micro Page 6 of 30
Pololu A-Star 32U4 User’s Guide © 2001–2014 Pololu Corporation

3.2. A-Star 32U4 Micro schematic and dimensions

Schematic diagram

Pololu A-Star 32U4 Micro schematic diagram.
This schematic is also available as a PDF: A-Star 32U4 Micro schematic diagram [http://www.pololu.com/file/download/
pololu-a-star-32u4-micro-schematic-diagram.pdf?file_id=0J742] (253k pdf).
3. A-Star 32U4 Micro Page 7 of 30
Pololu A-Star 32U4 User’s Guide © 2001–2014 Pololu Corporation

Dimension diagram

A dimension diagram of the A-Star 32U4 Micro is available as a PDF: A-Star 32U4 Micro dimension diagram
[http://www.pololu.com/file/download/pololu-a-star-32u4-micro-dimension-diagram.pdf?file_id=0J747] (255k pdf).
3. A-Star 32U4 Micro Page 8 of 30
Pololu A-Star 32U4 User’s Guide © 2001–2014 Pololu Corporation

4. A-Star 32U4 Mini

4.1. A-Star 32U4 Mini pinout and components

Pinout

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 [http://www.pololu.com/file/download/a-star-32u4-mini-pinout.pdf?file_id=0J784] (269k pdf). For more information about the ATmega32U4 microcontroller and its peripherals, see Atmel’s ATmega32U4 documentation.
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.

LEDs

The A-Star 32U4 Mini has three indicator LEDs.
The yellow LED is connected to Arduino pin 13, or PC7. You can drive this pin high in a user program to turn this LED on. The A-Star 32U4 Bootloader [http://www.pololu.com/docs/0J61/7] fades this LED on and off while it is waiting for a sketch to be loaded.
The green LED is connected to the pin labeled TXL, or PD5, 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 transmitting data via the USB connection.
4. A-Star 32U4 Mini Page 9 of 30
Loading...
+ 21 hidden pages