Support » Pololu A-Star 32U4 Robot Controller User’s Guide » 3. A-Star 32U4 Robot Controller with Raspberry Pi Bridge »
The A-Star 32U4 Robot Controller can be powered from an external voltage source, which is regulated to 5 V by its on-board switching regulator; the provided voltage is also used to supply the motor drivers directly. Alternatively, the A-Star’s USB connector can be used to provide 5 V only, leaving the motor drivers unpowered.
An external supply should be be connected to the points labeled Power In (or PWR+ and GND). These are power inputs with reverse-voltage protection that are controlled by the power switch. Together with the motor outputs, these power inputs are connected to sets of through-holes along the left side of the board. The larger holes are designed for 3.5 mm screw terminal blocks, while the smaller ones can be used with 0.1″ headers. A DC barrel jack can also be used to provide power. On the assembled version of the board, a six-pin strip of 3.5 mm terminal blocks and a barrel jack are soldered in for motor and power connections.
Warning: You must never connect different power sources to multiple Power In locations at the same time, as doing so will create a short between the supplies.
The slide switch on the A* controls whether the external source is connected to the 5 V regulator and motor drivers, providing a convenient way to switch off external power to the robot controller (and optionally an attached Raspberry Pi) 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 pin on the right).
When power is supplied through the Power In pins, the VIN pins can be used as an output to supply reverse-protected and switched power to other devices. Alternatively, the external supply can be connected directly between VIN and GND, bypassing the reverse-voltage protection and power switch.
One of the positive power inputs, labeled (PWR+), can optionally be reconfigured to serve as a VIN access point instead. To do so, cut the surface-mount jumper on the underside of the board to disconnect the PWR+ pad and the center pad, then use solder to bridge the VIN pad and the center pad.
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 one-third of the VIN voltage, and this voltage can be read by connecting it to the adjacent analog pin 1 (A1) (or another analog input). The
readBatteryMillivoltsSV() functions in the AStar32U4 library can be used to determine the battery voltage from this reading.
VIN supplies power to a 5 V regulator, whose output is designated VREG. The allowable input voltage range depends on the particular version of the A-Star 32U4 Robot Controller:
- LV: 2.7 V to 11 V (see Section 3.6 for regulator details)
- SV: 5.5 V to 36 V (see Section 3.7 for regulator details)
The regulator can be disabled by driving the regulator shutdown pin, REGSHDN, high; this will cause 5 V power to be sourced from USB instead if it is available.
The A-Star 32U4 Robot Controller’s power selection circuit uses the TPS2113A power multiplexer from Texas Instruments to choose whether its 5 V supply (designated 5V) is sourced from USB or an external supply via the regulator, allowing both sources to be connected at the same time and enabling the A* to safely and seamlessly transition between them. The TPS2113A is configured to select external power 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 A* is connected to USB.
Consequently, when the A-Star 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 batteries and without operating motors. It is safe to have USB connected and external power switched on at the same time.
The currently selected source is indicated by the STAT pin in the middle of the board; this pin is an open-drain output that is low if the external power source is selected and high-impedance if the USB supply is selected. The current limit of the TPS2113A is set to about 1.9 A nominally. For more information about the power multiplexer, see the TPS2113A datasheet (1k redirect).
Raspberry Pi power
By default, the robot controller will provide power from its 5V line to an attached Raspberry Pi. In this situation, we recommend supplying external power through the Power In pins so that the Raspberry Pi receives power from the A-Star’s on-board switching regulator. Alternatively, you can use a USB wall power adapter to supply power through the A-Star’s USB connector, although we have sometimes observed AVR brown-out resets occurring when the controller is powering the Raspberry Pi this way. A typical computer USB port might not be able to supply enough current to properly power the A-Star and an attached Raspberry Pi.
Power provided to the Raspberry Pi can be switched off by driving the Raspberry Pi shutdown pin, RPISHDN, to 5 V.
An ideal diode circuit on the A* makes it safe to have a different power supply connected to the Raspberry Pi (for example, through the Raspberry Pi’s USB Micro-B receptacle) while the A-Star 32U4 Robot Controller is connected and powered. (In other words, it is safe to have any combination of A-Star USB power, A-Star external power, and Raspberry Pi USB power connected to the system.) The RPI5V pin provides direct access to the Raspberry Pi’s 5 V line, which will typically come from the higher of the two power sources.
Note that the diode circuit prevents power from being shared in the reverse direction: the Raspberry Pi cannot supply 5 V logic power to the robot controller through the 40-pin connector.
3.3V supply for level shifters
Some of the level shifters on the A-Star are supplied with 3.3 V provided by an attached Raspberry Pi, and this voltage is also accessible through the RPI3V3 pins. If you want to use the level shifters in an application without a Raspberry Pi, you can instead supply them from the ATmega32U4 microcontroller’s integrated 3.3 V regulator by connecting the AVR3V3 pin to the adjacent RPI3V3 pin. (It is preferable to use the Raspberry Pi’s 3.3 V supply when available because it is produced by a switching regulator that is more efficient and can provide more current than the linear regulator in the AVR.) Alternatively, you can supply a different voltage between 1.65 V and 5 V to the RPI3V3 pin to make the level shifters shift to that voltage instead. See Section 3.8 for information about the level shifters.