pololu 32u4 tft display quotation
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). For more information about the ATmega32U4 microcontroller and its peripherals, see Atmel’s ATmega32U4 documentation.
The outermost rows of pins of the A-Star 32U4 Prime correspond to the pins on an Arduino Leonardo, and each is duplicated on a second inner row for more convenient access. Printed on the A* circuit board are indicators that you can use to quickly identify each I/O pin’s capabilities: a triangle by the inner through hole means the pin can be used as an analog input, and a square wave symbol next to the hole pair means the pin can be used as a PWM output.
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 microcontroller as the Leonardo, running at the same voltage and frequency, so the A* should generally work with any shield or accessory that is compatible with the Leonardo (including our Zumo Robot for Arduino).
A yellow user 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 fades this LED on and off while it is waiting for a sketch to be loaded.
A green user 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.
A red 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.
The AStar32U4Prime library contains functions that make it easier to control the three user LEDs. All three user LED control lines are also LCD data lines, so you will see them flicker when you update the LCD. The green and red user LEDs also share I/O lines with pushbuttons (see below).
The A-Star 32U4 Prime has four pushbuttons: a reset button next to the power switch and three user pushbuttons located along the right edge of the 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.
The three buttons’ I/O lines are also used for other purposes: pin 14 is MISO on the SPI interface, PD5 and pin 17 control the green and red user LEDs, and all three pins are LCD data lines. Although these uses require the pins to be driven by the AVR (or SPI slave devices in the case of MISO), resistors in the button circuits ensure that the A-Star will not be damaged even if the corresponding buttons are pressed at the same time, nor will SPI or LCD communications be disrupted. The functions in the AStar32U4Prime library take care of configuring the pins, reading and debouncing the buttons, and restoring the pins to their original states.
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. The stock buzzer is available as part of the A-Star 32U4 Prime accessory pack.
A through-hole jumper next to the buzzer provides a way to connect the buzzer input to digital pin 6 (which also serves as OC4D, a hardware PWM output from the AVR’s 10-bit Timer4). If you alternate between driving the buzzer pin high and low at a given frequency, the buzzer will produce sound at that frequency. You can play notes and music with the buzzer using functions in the AStar32U4PrimeBuzzer library.
Some versions of the A-Star 32U4 Prime include an onboard microSD card connector that enables the microcontroller to read from and write to microSD memory cards. The card socket is connected to the SPI interface on the ATmega32U4 through level-shifting circuits, allowing the 5 V microcontroller to safely communicate with standard 3.3 V SD cards. DI, DO, and SCLK on the card are connected to MOSI, MISO, and SCK on the AVR, respectively. The Arduino SD library can be used to access the file system on an inserted microSD card.
The A-Star 32U4 Prime has a mounting location for a 2×7 header where you can connect a character LCD with the common HD44780 parallel interface (109k pdf). The A* is optionally available with a male header installed here and an 8×2 character LCD (with corresponding female header) included; on other versions, you can add your own display using the connectors of your choice. A larger LCD can be connected with a ribbon cable and optionally a shrouded box header.
The LCD control lines are broken out to a column of through holes next to the LCD connector, labeled on the back side of the board. By default, some of these are connected to I/O lines from the ATmega32U4 to allow control of the LCD in 4-bit mode, but you can remap the connections by cutting the surface-mount jumpers indicated in the picture below and making new connections between I/O lines and LCD control pins.
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. This allows the LCD data lines to be used for other functions (such as pushbutton inputs and LED drivers).
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 (not included). The USB connection can be used to transmit 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 A-Star 32U4 Prime can either be powered directly from the USB 5 V supply or from an external voltage source, which is regulated to 5 V by its onboard switching regulator. The slide switch on A* controls whether the external source is connected to the input of the regulator, providing a convenient way to switch off external power to the A-Star without unplugging any connections. The adjacent set of three pins provides a place to connect your own power switch: to enable external power, connect the middle pin to ground (accessible through the upper pin).
In some situations, it might be undesirable for the A-Star 32U4 Prime to draw power from an external source when it is connected to USB, even if the power switch is left on. If this is the case, the regulator can be disabled by driving the regulator shutdown pin, SHDN, high; this shuts down the regulator and causes the power mux to fall back to USB power. For example, this could allow a battery-powered system to automatically turn off the regulator while it is connected to a computer.
When the A-Star 32U4 Prime is being powered through Power In, the sum of the 5V output current, 3V3 output current, GPIO output current, and current used by the board itself should not exceed the maximum current that the switching regulator can provide.
In a battery-powered application, it might be useful for the A-Star to monitor the battery’s voltage level. The BATLEV pin provides access to a voltage divider that outputs a fraction of the VIN voltage (one-third on the ac03b LV, one-fourth on the ac03e LV, and 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 readBatteryMillivoltsLV3(), readBatteryMillivoltsLV4(), and readBatteryMillivoltsSV() functions in the AStar32U4 library can be used to determine the battery voltage from this reading.
The Zumo 32U4 robot is a complete, versatile robot controlled by an Arduino-compatible ATmega32U4 microcontroller. When assembled, the low-profile tracked robot measures less than 10 cm on each side, making it suitable for Mini-Sumo competitions.
At the heart of the Zumo 32U4 is an integrated ATmega32U4 AVR microcontroller from Atmel, along with dual H-bridge drivers that power the robot’s motors. The robot also features a variety of sensors, including quadrature encoders and inertial sensors (accelerometer and gyro) on the main board, along with reflectance and proximity sensors on the front sensor array. On-board pushbuttons offer a convenient interface for user input, and a 128×64 graphical OLED display (LCD on original version), buzzer, and indicator LEDs allow the robot to provide feedback.
Like our A-Star 32U4 programmable controllers, the Zumo 32U4 features a USB interface and ships preloaded with an Arduino-compatible bootloader. We provide a software add-on that makes it easy to program the Zumo 32U4 from the Arduino environment, as well as a set of Arduino libraries to help interface with its on-board hardware.
The original version of the Zumo 32U4 includes an 8×2 character LCD, while the newer Zumo 32U4 OLED incorporates a graphical OLED display instead. The information in this user’s guide generally applies to both versions, and the name “Zumo 32U4” covers both the original (LCD) and OLED versions except where specific differences are noted.
The LCD version of the Zumo 32U4 main board has been produced in two revisions that use different on-board inertial sensor ICs: v1.0 boards had an LSM303D accelerometer and magnetometer and L3GD20H gyro, while v1.1 boards have an LSM6DS33 accelerometer and gyro and an LIS3MDL magnetometer (the same sensors used on the OLED version).
Our older Zumo robot for Arduino, built with a Zumo Shield, is another Arduino-compatible robotic platform based on the Zumo chassis. The Zumo Shield is designed for a board with a standard Arduino form factor, like an Arduino Uno, Arduino Leonardo, or A-Star 32U4 Prime, to plug into it and act as its controller.
By contrast, the Zumo 32U4 includes an on-board ATmega32U4 microcontroller (the same one used in the Leonardo and A-Star 32U4 boards), combining the functions of the Zumo Shield and the separate Arduino controller into a single board and enabling the resulting robot to be even more compact. However, it remains just as easy to program as a standard Arduino, thanks to its USB interface and preloaded Arduino-compatible bootloader. The Zumo 32U4 also adds many features that are not found on the Zumo Shield, including encoders, an OLED display or LCD, and proximity detection.
Some of the pin mappings and software libraries differ between the Zumo 32U4 and Zumo robot for Arduino, so programs written for one robot generally need to be modified to work on the other.
In addition, the Zumo 32U4 OLED Main Board is available separately; it is primarily intended as a replacement part, but it can also be used to make your own Zumo 32U4 OLED robot if you do not want all of the parts included with our full kit.
The original (LCD) version of the Zumo 32U4 robot is also available as a kit or assembled with 50:1, 75:1, or 100:1 motors, and its control board can also be purchased separately.
The diagrams above show the contents of the Zumo 32U4 OLED Kits. For the contents of the original Zumo 32U4 Kit, which includes an LCD and differ in a few other parts, refer to these diagrams instead.
The robot and chassis kit might include extra parts like jumper wires, screws, nuts, washers, and an acrylic spacer plate (which is not used in the Zumo 32U4), so do not be concerned if you have some leftover hardware after assembling your Zumo. Your kit might also include a length of heat shrink tubing that can be used as shrouds for IR LEDs. Kits shipped before August 2015 include heat shrink tubing but do not include the LED holder and its mounting screws.
The assembled versions of the Zumo 32U4 robot are complete, ready-to-program robot platforms built from the same components found in the Zumo 32U4 Robot Kit; no soldering or assembly is required. A choice of three motor gear ratios offer different combinations of torque and speed.
Different versions of the assembled Zumo 32U4 robots can be identified with a sticker on the underside of the main board, visible inside the battery compartment of the Zumo without batteries installed. The color of the sticker indicates the gear ratio of the robot’s motors:
If you are unsure which motors to choose, we recommend getting two of the 75:1 Micro Metal Gearmotor HP with Extended Motor Shaft, which offer a good balance of performance characteristics, and most of our example code was developed and tested with these motors. 50:1 HP and 100:1 HP motors also generally work well. These three motor types are the ones we offer in assembled Zumo 32U4 robots.
For more options, you can see our other micro metal gearmotors with extended motor shafts. Be sure to pick a motor that has an extended shaft, or else you will not be able to use the encoders on the Zumo 32U4.
Sensors, such as optical or sonar range finders (the Zumo 32U4 already has built-in IR proximity sensors, but additional sensors can be incorporated for increased range or detection area)
The Zumo 32U4 can be programmed using current versions of Microsoft Windows 11, Windows 10, Linux, and macOS. See our A-Star 32U4 bootloader page on GitHub for a list of older operating systems that have been tested with the bootloader and are likely to work.
We would be delighted to hear from you about your experiences with the Zumo 32U4 robot. If you need technical support or have any feedback you would like to share, you can contact us directly or post on our forum. 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!
The Zumo 32U4 main board features an integrated, USB-enabled ATmega32U4 AVR microcontroller from Atmel, clocked by a precision 16 MHz crystal oscillator. This is the same microcontroller and clock frequency used in our family of A-Star 32U4 programmable controllers, as well as the Arduino Leonardo and Arduino Micro.
The Zumo’s ATmega32U4 comes preloaded with the same Arduino-compatible USB bootloader as the A-Star 32U4, which allows it to be easily programmed using the Arduino IDE. For more information about programming the Zumo 32U4, see Section 5.
A yellow user LED is connected to Arduino digital pin 13, or PC7. You can drive this pin high in a user program to turn this LED on. The Zumo’s A-Star 32U4 Bootloader fades this LED on and off while it is waiting for a sketch to be loaded.
A green user 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.
A red 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.
The Zumo32U4 library contains functions that make it easier to control the three user LEDs (see Section 6). Some of the LED control lines are also display interface lines (green and red on the OLED version; all three LEDs on the original LCD version), so you will see them flicker when you update the display. The green and red user LEDs also share I/O lines with pushbuttons (see below).
The Zumo 32U4 has four pushbuttons: a reset button on the right edge and three user pushbuttons located along the rear 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.
The three buttons’ I/O lines are also used for other purposes: pin 14 is MISO on the SPI interface, PD5 and pin 17 control the green and red user LEDs, and some pins are display interface lines (pin 30 and pin 17 on the OLED version; all three buttons on the original LCD version). Although these uses require the pins to be driven by the AVR (or SPI slave devices in the case of MISO), resistors in the button circuits ensure that the Zumo will not be damaged even if the corresponding buttons are pressed at the same time, nor will SPI or display communications be disrupted. The functions in the Zumo32U4 library take care of configuring the pins, reading and debouncing the buttons, and restoring the pins to their original states.
The Zumo 32U4 OLED has a 1×7 header where you can connect a graphical OLED module with a low-profile male header. The included display has a resolution of 128×64 pixels and uses an SH1106 controller (1MB pdf), which the Zumo communicates with via software SPI. On-board level shifters convert 5 V signals from the Zumo’s microcontroller to the 3.3 V logic level required by the OLED module.
The original Zumo 32U4 has a 2×7 header where you can connect an 8×2 character LCD with a low-profile male header (or any other LCD with the common HD44780 parallel interface (109k pdf)). You can adjust the LCD contrast with the potentiometer directly above the LCD connector. We recommend using a 2 mm slotted screwdriver to adjust the contrast.
The Zumo32U4 library provides functions to show data on a connected display. It is designed to gracefully handle alternate use of the display interface lines by only changing pin states when needed for a display command, after which it will restore them to their previous states. This allows the display interface lines to be used for other functions (such as pushbutton inputs and LED drivers).
Although the OLED and LCD screens have different hardware interfaces, the library presents similar software interfaces for both that generally allow code written for the original (LCD) version of the Zumo 32U4 to work on the OLED version with minimal changes. The reverse is also true as long as your code does not make use of the OLED’s graphical capabilities.
The buzzer on the Zumo 32U4 can be used to generate simple sounds and music. By default, it is connected to digital pin 6 (which also serves as OC4D, a hardware PWM output from the AVR’s 10-bit Timer4). If you alternate between driving the buzzer pin high and low at a given frequency, the buzzer will produce sound at that frequency. You can play notes and music with the buzzer using functions in the Zumo32U4Buzzer library. If you want to use pin 6 for an alternate purpose, you can disconnect the buzzer circuit by cutting the surface-mount jumper next to the buzzer.
Two on-board Texas Instruments DRV8838 motor drivers power the Zumo 32U4’s two micro metal gearmotors. Four Arduino pins are used to control the drivers:
The Zumo32U4 library provides functions that allow you to easily control the motors, and it can optionally take care of flipping a direction signal for you if you accidentally soldered in a motor backwards (see Section 6).
Each drive motor on the Zumo 32U4 has a corresponding quadrature encoder system consisting of a magnetic disc attached to the extended motor shaft and a pair of Hall effect sensors mounted to the underside of the main board. Other than the sensor orientation, these encoders work similarly to our magnetic encoder kits for micro metal gearmotors. They can be used to track the rotational speed and direction of the robot’s drive sprockets.
Quadrature encoder transitions are often detected by monitoring both encoder channels directly. However, since transitions on the Zumo’s encoders can occur at high frequencies (several thousand per second) when its motors are running, it is necessary to use the AVR’s pin change interrupts or external interrupts to read the encoders. To reduce the required number of interrupt pins, the Zumo 32U4 main board XORs together both channels of each encoder and connects the resulting signal to an interrupt pin, while channel B of each encoder is connected to a non-interrupt pin:
The Zumo 32U4 library provides appropriate interrupt service routines and functions for reading the encoders and keeping track of their counts (see Section 6).
The Zumo 32U4 Front Sensor Array is a separate board that attaches to the main board. The board features five line sensors and three proximity sensors, though by default, you can only have six of these eight sensors connected to the Zumo’s microcontroller at any given time.
The three proximity sensors face in different directions away from the Zumo and can help detect nearby objects. They can also be used to detect commands from typical IR remote controls. The proximity sensors, like the line sensors, detect reflected IR light, but they are designed to only detect light that is turned on and off quickly at a frequency of 38 kHz. To read a proximity sensor, the AVR can enable the internal pull-up on the corresponding I/O line. When the sensor is active, it will drive the line low. The proximity sensors do not have IR emitters paired with them; instead they detect reflected 38 kHz IR light that comes from LEDs on the Zumo 32U4 Main Board, which are described in Section 3.6. The proximity sensors are named after the directions they face: left, right, or front. In schematics and diagrams, they are referred to as LEFT, RIGHT, and FRONT. On the front sensor array, their signals are labeled LFT, FRONT, and RGT. The part used for the proximity sensors is the Vishay TSSP77038 IR receiver module (268k pdf). The TSSP77038 has a fixed gain (sensitivity) that makes the sensor more predictable.
The infrared emitted by the line sensors can interfere with the proximity sensors and cause false readings, so it is recommended to turn off the line sensor emitters before using the proximity sensors. The Zumo32U4ProximitySensors class from the Zumo 32U4 Arduino library takes care of turning off the line sensor emitters.
The assembled versions of the Zumo 32U4 robot ship with jumpers selecting the left (LFT) and right (RGT) proximity sensors instead of down-facing DN2 and DN4, so these versions are configured for three down-facing sensors and all three proximity sensors by default.
If you want to use all five line sensors and all three proximity sensors in one application, you can accomplish that by freeing up two I/O lines and remapping two of the pins. One way to accomplish this is by removing the Zumo’s display to free up pins 0 and 1. Next, configure the jumpers on the front sensor array to connect pin 4 to line sensor 4, and pin 20 to line sensor 2. Solder a wire from the right proximity sensor signal to pin 0, and solder a wire from the left proximity sensor to pin 1. You will need to modify your code to include the new pin assignments, and you should remove all display-related code.
The Zumo 32U4 can detect nearby objects using the three proximity sensors on the front sensor array. The proximity sensors do not emit their own light; instead they are designed to detect 38 kHz infrared (IR) signals from emitters on the Zumo 32U4 Main Board.
The kit version of the Zumo 32U4 comes with two types of through-hole IR LEDs that can be installed to serve as the forward emitters. Both types of LEDs use the T-1 3/4 package, meaning they have a diameter of approximately 5 mm. Also, they both emit 940 nm light. The main difference between these LEDs is their viewing angle. The blue-colored LEDs have a relatively narrow viewing angle of 20°, which makes them better at illuminating objects far away. The clear LEDs have a much wider 50° viewing angle, which makes them better at illuminating objects that are not directly in front of the Zumo. The choice of IR LEDs to use is one way for you to customize your Zumo.
The assembled versions of the Zumo 32U4 robot ship with clear (wide-angle) LEDs installed; blue (narrow-angle) LEDs are not included with these versions.
Proper shielding for the forward emitters is important; without shielding, light from the LEDs can activate the proximity sensors directly and cause false readings. The Zumo 32U4 comes with a plastic LED holder that serves to shield the LEDs while also holding them in place and helping to protect them from collisions with other robots. The LED holder screws to the blade with the two included 3/16″ #2-28 thread-forming screws. See the assembly instructions in Section 4 to learn how to properly install the forward emitters with the LED holder.
The FaceTowardsOpponent demo found in the Zumo 32U4 Arduino library (Section 6) uses the motors and the front proximity sensor to scan for nearby objects, face directly towards them, and track them if they move. To directly face an object, it compares the two readings from the front sensor: the number of brightness levels for the left LEDs that resulted in the sensor activating, and the number of brightness levels for the right LEDs that resulted in the sensor activating. If the left reading is greater than the right reading, it means the object is closer to the left LEDs, so the robot should turn left (counter-clockwise) to face it more directly. Similarly, if the right reading is greater than the left reading, the robot should turn right (clockwise). If both of the readings are below a certain threshold, then it just turns the motors in order to scan for nearby objects.
The Zumo 32U4 includes on-board sensors that can be used as an inertial measurement unit (IMU) for applications like helping your Zumo detect collisions and determine its own orientation.
The inertial sensors include a 3-axis accelerometer, 3-axis gyro, and 3-axis magnetometer, all connected to a shared I²C bus connected to the ATmega32U4’s I²C interface. The specific inertial sensor chips used on a Zumo 32U4 depend on its version:
Level shifters built into the main board allow the inertial sensors, which operate at 3.3 V, to be connected to the ATmega32U4 (operating at 5 V). The sensors, level shifters, and I²C pull-up resistors are connected to the SDA (digital pin 2, or PD1) and SCL (digital pin 3, or PD0) pins on the AVR by default, but they can be disconnected by cutting the surface-mount jumpers labeled “2 = SDA” and “3 = SCL” on the board to allow those pins to be used for other purposes.
The Zumo32U4 library (see Section 6) includes functions that help configure and read the inertial sensors, and it abstracts details of the specific sensor ICs to make it easier to write programs that will work on all versions of the Zumo 32U4. The library includes some example programs that demonstrate how to use the sensors.
For advanced applications, you can instead use some of the dedicated libraries that we have written for these sensor chips; these include our LSM6 Arduino library, LIS3MDL Arduino library, LSM303 Arduino library, and L3G Arduino library. The Zumo 32U4 main boards use the same inertial sensor ICs as some of our IMU boards, like the MinIMU-9 v5, so Arduino software written for the MinIMU-9 (such as our AHRS example) can also be adapted to work on a Zumo 32U4.
Please note that the magnetometer on the Zumo 32U4 is affected by currents in the motors and buzzer when they are operating, as well as metal in the batteries, and the readings are easily influenced by magnetic distortions in the environment around the Zumo (such as rebar in a concrete floor). As a result, it is very hard to accurately determine the Zumo’s absolute heading based on the magnetometer data. However, in our tests, we found that the magnetometer could still be useful for rough measurements of relative orientation changes; for example, once the magnetic readings are compensated for a particular environment, they can be used to help the Zumo turn left or right by a specific angle instead of just timing how long to run the motors to make such a turn (although the gyro or encoders might be better suited for this particular purpose).
The battery voltage on VBAT can be monitored through a voltage divider that is connected to analog pin 1 (PF6) by default. The divider outputs a voltage that is equal to one half of the battery voltage, which will be safely below the ATmega32U4’s maximum analog input voltage of 5 V as long as the battery voltage is less than 10 V. The readBatteryMillivolts() function in the Zumo32U4 library can be used to determine the battery voltage from this reading (see Section 6).
The Zumo 32U4 main board’s power selection circuit uses the TPS2113A power multiplexer from Texas Instruments to choose whether its 5 V logic supply (designated 5V) is sourced from USB or the batteries via the regulator, enabling the robot to safely and seamlessly transition between the two sources. The TPS2113A is configured to select regulated battery power (VREG) unless the regulator output falls below about 4.5 V. If this happens, it will select the higher of the two sources, which will typically be the USB 5 V bus voltage if the Zumo is connected to USB.
Consequently, when the Zumo 32U4 is connected to a computer via USB, it will receive 5 V logic power even when the power switch is off. This can be useful if you want to upload or test a program without drawing power from the batteries and without operating the motors. It is safe to have USB connected and battery power switched on at the same time.
For users who want to experiment with alternative power sources like lithium batteries, the Zumo 32U4 can accept a battery input voltage from 2.7 V to 10 V. You can raise the maximum allowable voltage to the motor drivers’ limit of 11 V by disconnecting or modifying the battery voltage divider.
We do not recommend using a 3-cell lithium battery to power the Zumo 32U4. Even though such a battery is usually specified with a nominal voltage of 11.1 V, it can measure well over 12 V when fully charged.
You can add your own power switch to the Zumo 32U4 using the PSW pin. When it is in the on position, your switch should connect PSW to GND. In that case, VBAT will receive power when either your switch or the main board switch are on.
The top expansion areas on the Zumo 32U4 main board (in two 2×13 groups of pins near the left and right edges) break out all of the ATmega32U4 microcontroller’s general-purpose I/O lines and provide access to various power inputs and outputs. Some of these pins are also broken out in the front expansion area, where the front sensor array connects. The following diagrams identify the locations of these pins and the hardware associated with them (OLED version pictured below). These diagrams are also available as printable PDFs:
The table below lists the most important pin assignments for the ATmega32U4 on the Zumo 32U4. This table is helpful if you want to add your own electronics to the Zumo 32U4, write your own low-level code for interfacing with the hardware, or just want to understand better how the Zumo 32U4 works. Each row represents a physical pin on the ATmega32U4.
The “Zumo 32U4 functions” column documents what the pin is used for on the Zumo 32U4. Many pins can serve multiple purposes concurrently by switching modes. For example, PB0 can read the state of button C when it is an input, and it can control the red LED and serve as a display data line when it is an output.
If you want your additional electronics to send or receive information from the AVR, you will need to connect them to one or more of the AVR’s I/O pins. Each I/O pin is already being used for some other purpose, as documented in Section 3.10, so you might need to disable or disconnect one of the other features of the Zumo 32U4.
If you do not need the display, you can remove it. This frees up pin 0 (PD2) and pin 1 (PD3). These pins are the transmit (TX) and receive (RX) pins of the UART, so you can use them to establish serial communication with another microcontroller. These pins are also capable of digital I/O. These pins are the recommended pins for connecting two output channels from an RC receiver, or for controlling two RC servos, because they are arranged in a convenient way with respect to power and ground on the right-side expansion header.
On the original (LCD) version of the Zumo 32U4, if you have removed the LCD and do not need to use button A, this frees up pin 14 (PB3). Pin 14 is capable of digital input and output. Removing the LCD also frees up the LCD contrast potentiometer for other purposes. The output of the potentiometer is a 0 V to 5 V signal which is accessible on the LCD connector. It can be connected to any free analog input if you want to read it from the AVR, or it might be useful to connect it to the other electronics that you are adding.
Be careful about connecting electronics to pin 13 (PC7), pin 17 (PB0), and PD5. These pins are used to control the LEDs on the Zumo 32U4. All three of these pins are controlled as outputs by the bootloader. Pin 17 (PB0) and PD5 are used as RX and TX indicators, so if you are sending or receiving data over USB then the Arduino USB code will drive those pins in its interrupt service routines while your sketch is running.
It should be possible to attach additional I²C slave devices to the Zumo 32U4’s I²C bus without giving up any features as long as the additional devices’ slave addresses do not conflict with those of the inertial sensors. (The sensors’ addresses are specified in their respective datasheets, which can be found in Section 3.7). The I²C pins (pins 2 and 3) operate at 5 V, so level shifters might be necessary to interface with other devices that use different voltages. (The level-shifted 3.3 V signals used by the inertial sensors are not available to the user.)
If you do not want to use the inertial sensors on the Zumo 32U4’s I²C bus, you can cut the surface-mount jumpers labeled “2 = SDA” and “3 = SCL”. This frees up pin 2 (PD1) and pin 3 (PD0). These pins can be used as digital inputs and outputs.
All of the Zumo’s power nodes are accessible from the left expansion area. If you power additional devices from VBAT, then they will be powered whenever the Zumo’s power switch is in the ON position, and they will receive whatever voltage the batteries are outputting. If you power them from VREG, they will get 5 V power whenever the batteries are installed and the power switch is on (but they cannot be powered from USB). If you power them from the 5V pin, then they will receive 5V power whenever the Zumo 32U4 logic components are powered. If you power them from 3V3, they will receive 3.3V power whenever the Zumo 32U4 logic components are powered. For more information about these power nodes and how much current they can provide, see Section 3.8.
You should make sure that all the grounds in your system are connected. The Zumo 32U4’s ground node is labeled “GND” and can be accessed from any of the expansion areas. It should be connected to the ground node of every other circuit board or device you add to the robot.
You should refer to Section 3.9 to locate the access points in the Zumo 32U4 expansion areas for the pins you have chosen. One option to make the connections to those pins is to get two 2×13-pin female headers and solder them in to the left and right expansion areas. Another option would be to break off pieces of a 2×40-pin male header and solder them in. Our premium jumper wires can then be plugged into the male or female headers.
It is possible to modify the Servo library that comes with the Arduino IDE to use Timer 3 instead of Timer 1 with an ATmega32U4 based controller like the Zumo 32U4. The modified Servo library does not interfere with Zumo32U4Motors, making it possible to simultaneously control servos and the motors.
Warning: The modifications described here will affect any sketch for an ATmega32U4 based controller that uses the Servo library, including the Arduino Leonardo or A-Star.
The Arduino IDE will automatically incorporate your modifications to the Servo library. The next time you compile a sketch for an ATmega32U4 based controller that uses the Servo library, it will use Timer 3 instead of Timer 1.
Timer3 is used by the Zumo 32U4 Arduino library for emitting 38 kHz IR pulses for the proximity sensors, but it can be used for other purposes between readings of the sensors.
Timer4 is used by the Zumo 32U4 Arduino library for controlling the buzzer. The buzzer pin (digital pin 6, or PD7; Timer4 output OC4D) can be freed for other uses by cutting the surface-mount jumper labeled “6 = Buzzer”.
Please follow these instructions carefully to assemble your Zumo 32U4 robot kit properly. If you have an assembled version of the Zumo 32U4 robot, you can skip to Section 5 and start programming it!
Most of the hardware on the Zumo 32U4 main board consists of surface-mount components that are already soldered to the board, but there are a few through-hole parts that you need to solder yourself.
If you have an older Zumo 32U4 kit with white sprockets (which we shipped before May 2015), you should skip step 4 and install the drive sprockets after step 14 instead, at the same time as the idler sprockets. (If the white drive sprockets were attached now, their shape would make the motors, chassis, and main board difficult to assemble.)
Each motor’s positive terminal is indicated by a plus sign (+) in the black plastic end of the motor. If you are using one of our recommended micro metal gearmotors (50:1, 75:1, or 100:1) or any lower gear ratio, the motors should be soldered into the main board with the positive terminal closest to the front, so you should attach the leads to allow the motors to be oriented this way. However, if you are using a motor with a 150:1 or higher gear ratio, you should reverse the motor orientation so the positive terminals are facing the rear. (Don’t worry if you accidentally get the orientation of one or both motors wrong, though. You can later correct for it in software with our Zumo32U4 library.)
Solder the 1×7 low-profile header to the OLED display (or the 2×7 low-profile header to the LCD). The shorter side of the header should be inserted fully through the corresponding through holes from the bottom side of the display module until the header is flush, and the solder joints should be made on the top (screen) side of the display. Tip: Solder a single pin first and ensure the header is flush before making any additional solder joints. If the header is not flush, you can use the soldering iron to re-melt the solder joint while you make the necessary adjustments. Be careful not to touch the pin you are soldering as the heat will conduct all the way through to the other end!
On the Zumo 32U4 OLED version, you can optionally install a #2-56 standoff to help support the OLED display. Tighten the standoff against a nut under the chassis.
Plug the display into the matching female header on top of the main board; the display should cover the buzzer. You can optionally use one more 3/16″ #2-56 screw to secure the OLED display to the standoff.
Warning: The display header does not enforce proper orientation, so it is possible to plug the display in offset or rotated 180° from its intended position. Incorrect positioning can damage the display or the main board, so please take care during this step to ensure that the display is plugged in properly.
Choose a pair of through-hole infrared LEDs to use as the forward emitters. (See Section 3.6 for details about the different LEDs included with the Zumo 32U4.)
The Zumo 32U4 is designed to be programmed over USB from the Arduino IDE. It can be programmed from Windows, Linux, and macOS. The ATmega32U4 on the Zumo 32U4 comes preloaded with the same USB bootloader as the A-Star 32U4 family of general-purpose programmable ATmega32U4 boards. The following sections will help you get started programming your Zumo 32U4.
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:
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. This can happen if you are using Windows 10 or later and you plugged the A-Star into your computer before installing our drivers for it. In that case, Windows will set up your A-Star using the default Windows serial driver (usbser.inf), and it will display “USB Serial Device” as the name for the port. The port will still be usable, but it will be hard to tell if it is the right one because of the generic name shown in the Device Manager. We recommend fixing the names in the Device Manager by right-clicking on each “USB Serial Device” entry, selecting “Update Driver Software…”, and then selecting “Search automatically for updated driver software”. Windows should find the drivers you already installed, which contain the correct name for the port.
Our 32U4 family of boards can be programmed from the popular Arduino integrated development environment (IDE). The Arduino IDE is a cross-platform, open source application that integrates a C++ code editor, the GNU C++ compiler, and a program upload utility. To get started programming your device with the Arduino IDE (version 1.6.4 or later), follow these steps:
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.
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”).
The A-Star 32U4 boards are similar to the Arduino Leonardo and Arduino Micro, so you can search the Internet for relevant projects that use one of those boards.
This section explains how to program our 32U4 family of boards using the avr-gcc toolchain and AVRDUDE. This section is intended for advanced users who do not want to use the Arduino IDE as described in the previous section.
If you are using Windows, we recommend downloading WinAVR, which contains the avr-gcc toolchain and a command-line utility called AVRDUDE that can be used to upload programs to the A-Star bootloader. If the version of GNU Make that comes with WinAVR crashes on your computer, we recommend using the Pololu version of GNU Make.
To program the A-Star device, you will need to get it into bootloader mode first. One way to do this is to reset the AVR twice within 750 ms. Most of the boards in our 32U4 family have a reset button that can be used to reset the board. On any of our 32U4 family of boards, a pushbutton can be connected between the GND and RST pins to serve as a reset button, or you can use a wire. Once the device is in bootloader mode, quickly run the command make program to program it. If you wait longer than 8 seconds, the A-Star bootloader will exit and the AVR will go back to running the user program.
To help interface with all the on-board hardware on the Zumo 32U4, we provide the Zumo32U4 library. The Zumo32U4 library documentation provides detailed information about the library, and the library comes with several example sketches.
After you install the Zumo32U4 library, you can learn more about it by trying the included example sketches and by reading the Zumo32U4 library documentation.
Our 32U4 family of boards are based on a single ATmega32U4 AVR microcontroller that runs the user program and also handles the USB connection to the computer. The AVR has a full-speed USB transceiver built into it and can be programmed to present almost any type of USB device interface to the computer.
USB is an asymmetric system that consists of a single “host” connected to multiple “devices”. The host is typically a personal computer. The ATmega32U4 can only act as a USB device, so an A-Star device cannot be connected to other USB devices like mice and keyboards; it can only be connected to a host such as your computer.
Programming an ATmega32U4 board using the Arduino IDE as described earlier will automatically configure it as a composite device with a single virtual serial port. If you program the microcontroller with an Arduino sketch that implements another USB device class, like HID or MIDI, you will see additional child devices as well.
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”). Windows will assign a different COM port number to the device depending on what USB port you plug it into and whether it is in bootloader mode or not. If you need to change the COM port number assigned to the A-Star, you can do so using the Device Manager. Double-click on the COM port to open its properties dialog, and click the “Advanced…” button in the “Port Settings” tab. From this dialog you can change the COM port assigned to the device.
On a Windows computer, you can see the rest of the USB interface by going to the Device Manager, selecting View > Devices by connection, and then expanding entries until you find the “Pololu A-Star 32U4” COM port. Near it, you should see the parent composite device.
You can send and receive bytes from the virtual serial port using any terminal program that supports serial ports. Some examples are the Serial Monitor in Arduino IDE, the Pololu Serial Transmitter Utility, Br@y Terminal, PuTTY, TeraTerm, Kermit, and GNU Screen. Many computer programming environments also support sending and receiving bytes from a serial port.
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. If you just want to get started using your device, it is fine to skip this section.
The A-Star 32U4 Bootloader is based on the Caterina bootloader, which is the bootloader used on the Arduino Leonardo, Arduino Micro and several other ATmega32U4 boards. The bootloader is open source and its source code is available on GitHub. The bootloader occupies the upper four kilobytes of the ATmega32U4’s program memory, leaving 28 KB for the user program. The bootloader’s USB interface consists of a single virtual serial port that accepts the programming commands defined in AVR109. The bootloader always runs first immediately after the AVR is reset.
The main difference between the A-Star 32U4 Bootloader and Caterina is in the startup logic. This is the part of the bootloader that runs immediately after the AVR is reset, and it decides whether to run the user program or run the rest of the bootloader. The startup logic of the Caterina bootloader is designed so that when the RST line goes low, the bootloader will run. This means that if you want to restart your program using the RST line, it will take 8 seconds before the bootloader times out waiting for an upload and the sketch starts.
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. If the RST line goes low twice within 750 ms, then the bootloader will run. (This behavior is the same as on boards like SparkFun’s Pro Micro.)
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. 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 you could put in your setup function for detecting brown-out resets:
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 you are programming the device from the Arduino IDE, the sketch loaded onto the device will generally support a special USB command for putting it in bootloader mode, and the Arduino IDE sends that command automatically when you click the Upload button. However, you might find yourself in a situation where the device is unresponsive and that method will not work. This can happen for two reasons:
This section explains three special methods for programming an A-Star (or another of our 32U4 family of boards) using the Arduino IDE in case your usual method of programming is not working.
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 boards in our 32U4 family have a reset button you can use. Alternatively, you can use a wire to temporarily connect GND and RST together instead of using a reset button.
Connect a substitute serial port device to your computer. This should be a device that is recognized by the Arduino IDE as a serial port, but it should not be an A-Star 32U4, Arduino Leonardo, Arduino Micro, or any other device that disappears and reappears as a new device when a piece of software like the Arduino IDE opens the port, sets the baud rate to 1200, and then closes the port. It should also be a device that will not cause any problems if it receives data from the Arduino IDE. Here are some examples of substitute serial port devices:
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.
Using a text editor, open the file named boards.txt that provides the “Pololu A-Star” board entries. In Windows, you can typically find this file in %LocalAppData%\Arduino15\packages\pololu-a-star\hardware\avr\. In Linux, you can typically find this file in ~/.arduino15/packages/pololu-a-star/hardware/avr/. On macOS, you can typically find this file in ~/Library/Arduino15/packages/pololu-a-star/hardware/avr/. If you installed the boards manually instead of using the Board Manager, you can find it in [sketchbook location]/hardware/pololu/avr.
In the boards.txt file that you opened, find the lines at the bottom of the file that start with #a-star32U4bp. Uncomment each of those lines by deleting the “#” character, and then save the file.
In the “Tools” menu, open the “Board” sub-menu and select “Pololu A-Star 32U4 (bootloader port)”. This entry is configured so that the Arduino IDE will send programming commands directly to selected serial port, instead of trying to send a special USB command to the port to get it into bootloader mode and then waiting for the new port to appear. By selecting this entry, the timing of the programming process below becomes easier, especially on Windows.
This section explains a special method for reviving an A-Star (or another of our 32U4 family of boards) using the command-line utility AVRDUDE in case your usual method of 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. Other boards in our 32U4 family have a reset button you can use. Alternatively, you can use a wire to temporarily connect GND and RST together instead of using a reset button.
The Arduino IDE has many examples that can run on the Zumo 32U4 (although note that the Zumo’s on-board hardware might conflict with some of these examples).
The Zumo 32U4 uses the same microcontroller as the Arduino Leonardo and Arduino Micro, so you can search the Internet for relevant projects and code examples that use one of those boards.
That TFT LCD display from Adafruit uses SPI to communicate. You should be able to use the SPI pins on the ISP header on the A-Star to communicate with that display. You might find the diagram below helpful for using those pins (we will try to add this to the user’s guide soon).
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). For more information about the ATmega32U4 microcontroller and its peripherals, see Atmel’s ATmega32U4 documentation.
The outermost rows of pins of the A-Star 32U4 Prime correspond to the pins on an Arduino Leonardo, and each is duplicated on a second inner row for more convenient access. Printed on the A* circuit board are indicators that you can use to quickly identify each I/O pin’s capabilities: a triangle by the inner through hole means the pin can be used as an analog input, and a square wave symbol next to the hole pair means the pin can be used as a PWM output.
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 microcontroller as the Leonardo, running at the same voltage and frequency, so the A* should generally work with any shield or accessory that is compatible with the Leonardo (including our Zumo Robot for Arduino).
A yellow user 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 fades this LED on and off while it is waiting for a sketch to be loaded.
A green user 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.
A red 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.
The AStar32U4Prime library contains functions that make it easier to control the three user LEDs. All three user LED control lines are also LCD data lines, so you will see them flicker when you update the LCD. The green and red user LEDs also share I/O lines with pushbuttons (see below).
The A-Star 32U4 Prime has four pushbuttons: a reset button next to the power switch and three user pushbuttons located along the right edge of the 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.
The three buttons’ I/O lines are also used for other purposes: pin 14 is MISO on the SPI interface, PD5 and pin 17 control the green and red user LEDs, and all three pins are LCD data lines. Although these uses require the pins to be driven by the AVR (or SPI slave devices in the case of MISO), resistors in the button circuits ensure that the A-Star will not be damaged even if the corresponding buttons are pressed at the same time, nor will SPI or LCD communications be disrupted. The functions in the AStar32U4Prime library take care of configuring the pins, reading and debouncing the buttons, and restoring the pins to their original states.
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. The stock buzzer is available as part of the A-Star 32U4 Prime accessory pack.
A through-hole jumper next to the buzzer provides a way to connect the buzzer input to digital pin 6 (which also serves as OC4D, a hardware PWM output from the AVR’s 10-bit Timer4). If you alternate between driving the buzzer pin high and low at a given frequency, the buzzer will produce sound at that frequency. You can play notes and music with the buzzer using functions in the AStar32U4PrimeBuzzer library.
Some versions of the A-Star 32U4 Prime include an onboard microSD card connector that enables the microcontroller to read from and write to microSD memory cards. The card socket is connected to the SPI interface on the ATmega32U4 through level-shifting circuits, allowing the 5 V microcontroller to safely communicate with standard 3.3 V SD cards. DI, DO, and SCLK on the card are connected to MOSI, MISO, and SCK on the AVR, respectively. The Arduino SD library can be used to access the file system on an inserted microSD card.
The A-Star 32U4 Prime has a mounting location for a 2×7 header where you can connect a character LCD with the common HD44780 parallel interface (109k pdf). The A* is optionally available with a male header installed here and an 8×2 character LCD (with corresponding female header) included; on other versions, you can add your own display using the connectors of your choice. A larger LCD can be connected with a ribbon cable and optionally a shrouded box header.
The LCD control lines are broken out to a column of through holes next to the LCD connector, labeled on the back side of the board. By default, some of these are connected to I/O lines from the ATmega32U4 to allow control of the LCD in 4-bit mode, but you can remap the connections by cutting the surface-mount jumpers indicated in the picture below and making new connections between I/O lines and LCD control pins.
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. This allows the LCD data lines to be used for other functions (such as pushbutton inputs and LED drivers).
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 (not included). The USB connection can be used to transmit 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 A-Star 32U4 Prime can either be powered directly from the USB 5 V supply or from an external voltage source, which is regulated to 5 V by its onboard switching regulator. The slide switch on A* controls whether the external source is connected to the input of the regulator, providing a convenient way to switch off external power to the A-Star without unplugging any connections. The adjacent set of three pins provides a place to connect your own power switch: to enable external power, connect the middle pin to ground (accessible through the upper pin).
In some situations, it might be undesirable for the A-Star 32U4 Prime to draw power from an external source when it is connected to USB, even if the power switch is left on. If this is the case, the regulator can be disabled by driving the regulator shutdown pin, SHDN, high; this shuts down the regulator and causes the power mux to fall back to USB power. For example, this could allow a battery-powered system to automatically turn off the regulator while it is connected to a computer.
When the A-Star 32U4 Prime is being powered through Power In, the sum of the 5V output current, 3V3 output current, GPIO output current, and current used by the board itself should not exceed the maximum current that the switching regulator can provide.
In a battery-powered application, it might be useful for the A-Star to monitor the battery’s voltage level. The BATLEV pin provides access to a voltage divider that outputs a fraction of the VIN voltage (one-third on the ac03b LV, one-fourth on the ac03e LV, and 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 readBatteryMillivoltsLV3(), readBatteryMillivoltsLV4(), and readBatteryMillivoltsSV() functions in the AStar32U4 library can be used to determine the battery voltage from this reading.
The 3pi+ 32U4 is a versatile, high-performance, user-programmable robot that measures just 9.7cm in diameter. At its heart is an ATmega32U4 AVR microcontroller from Microchip (formerly Atmel), and like Pololu"s A-Star 32U4 programmable controllers, the 3Pi+ 32U4 features a USB interface and ships preloaded with an Arduino-compatible bootloader, so all you need to program it is a USB A to Micro-B cable (not included). A software add-on is available that makes it easy to program the robot from the Arduino environment, and Pololu have Arduino libraries and example sketches to help get you started. For advanced users who want to customize or enhance their robots with additional peripherals, the robot’s power rails, power system controls, and microcontroller’s I/O lines can be accessed via several 2.54mm pitch expansion ports.
The Pololu A-Star 32U4 Prime is a general-purpose programmable board based on Atmel’s ATmega32U4 AVR microcontroller and arranged in the common Arduino form factor exemplified by the Uno R3 and Leonardo. As such, the A-Star Prime (abbreviated A* Prime) is compatible with many Arduino shields, including all of the Arduino shields we carry. All 26 of the microcontroller’s GPIO lines are accessible on the board, including seven than can be used as PWM outputs and twelve that can be used as analog inputs. The ATmega32U4 is capable of native full-speed USB, which makes it more versatile than similar boards that rely on USB-to-serial adapters: in addition to supporting a virtual (CDC) serial/COM port interface, the A-Star can appear to a connected computer as a mouse and keyboard. The A-Star’s USB interface can be accessed through its USB Micro-B connector.
FeaturesProgrammable 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)
All 26 general-purpose I/O lines from the ATmega32U4 are broken out (including PB0, PD5, and PE2); 7 of these can be used as hardware PWM outputs and 12 of these can be used as analog inputs
The A-Star 32U4 Robot Controller LV with Raspberry Pi Bridge is a programmable module well-suited for robotics applications, designed to work either as an auxiliary controller mounted to