3.6. Power

The Balboa 32U4 control board includes battery terminal connections that provide access to power from the Balboa chassis’s six-AA battery compartment. We recommend using rechargeable AA NiMH cells, which results in a nominal voltage of 7.2 V (1.2 V per cell). You can also use alkaline cells, which would nominally give you 9 V.

The negative battery voltage is connected to GND. The positive battery voltage is designated VBAT. VBAT feeds into a reverse protection circuit and then a power switching circuit controlled by the on-board pushbutton or slide switch. The output of the power switching circuit is designated VSW.

VSW provides power to the motors through the on-board DRV8838 motor drivers, so the motors can only operate if the batteries are installed and the power switch circuit is on.

The reverse protected and switched battery voltage on VSW can be monitored through a voltage divider that is connected to analog pin 1 (PF6). The divider outputs a voltage that is equal to one third 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 15 V (though the maximum voltage for the board is still limited to 10.8 V by the DRV8838 motor driver). The readBatteryMillivolts() function in the Balboa32U4 library can be used to determine the battery voltage from this reading.

Power switch circuit

The Balboa 32U4 control board uses the patented latching circuit from the Pololu pushbutton power switch, which provides a solid-state power switch for your robot controlled with the on-board pushbutton. By default, this pushbutton can be used to toggle power: one push turns on power and another turns it off. Alternatively, a separate pushbutton can be connected to the PWRA and PWRB pins and used instead. Multiple pushbuttons can be wired in parallel for multiple control points, and each of the parallel pushbuttons, including the one on the board itself, will be able to turn the switch on or off. The latching circuit performs some button debouncing, but pushbuttons with excessive bouncing (several ms) might not function well with it.

For proper pushbutton operation, the board’s slide switch should be left in its Off position. (Sliding the switch to the On position will cause the board power to latch on, and the switch must be returned to the Off position before the board can be turned off with the pushbutton.)

Alternatively, to disable the pushbutton, you can cut the button jumper labeled Btn Jmp; this transfers control of the board’s power to the on-board slide switch instead. A separate slide or toggle switch can be connected to the GATE pin and used instead.

The power switch circuit also offers several alternate pushbutton connection options that result in push-on-only or push-off-only operation, and additional inputs enable further power control options like allowing your robot to turn off its own power. These advanced control options are available through the button connection pins and four control inputs:

PIN Description
PWRA Connect through momentary switch to pin “PWRB” for standard push-on/push-off operation. Connect through momentary switch to ground for on-only operation.
PWRB Connect through momentary switch to pin “PWRA” for standard push-on/push-off operation.
ON A high pulse (> 1 V) on this pin turns on the switch circuit. This pin only functions when pushbutton operation is enabled (i.e. the button jumper has not been cut).
OFF A high pulse (> 1 V) on this pin turns off the switch circuit (e.g. allowing a powered device to shut off its own power). This pin only functions when pushbutton operation is enabled.
CTRL With pushbutton operation enabled, this pin directly determines the state of the switch circuit. A high pulse (> 1 V) on this pin turns on the switch; a low pulse (e.g. driving the pin low with a microcontroller output line or pushing a button connected from this pin to ground) turns the switch off. Leave this pin disconnected or floating when not trying to set the switch state. Note that this pin should not be driven high at the same time the “OFF” pin is driven high.
GATE With pushbutton operation disabled (button jumper cut), this pin controls the state of the switch circuit: driving it low turns the switch on, while letting it float turns the switch off. Connect through slide or toggle switch to ground for on/off operation. Leave this pin disconnected or floating for proper pushbutton operation. We recommend only ever driving this pin low or leaving it floating; this pin should never be driven high while the slide switch is in the “On” position.

5 V and 3.3 V regulators

VSW supplies power to a 5 V regulator, whose output is designated VREG. The battery voltage is regulated to 5 V by an MP4423H switching buck converter; although the regulator itself works with input voltages up to 36 V, the motor drivers limit the control board’s maximum input voltage to 10.8 V. When available, VREG is generally used to supply logic power for the ATmega32U4, motor drivers, and encoders. The rest of the regulator’s achievable output current, which depends on input voltage and ambient conditions, can be used to power other devices; this can include an attached Raspberry Pi (which typically draws a few hundred milliamps). Under typical conditions, up to 2 A of current is available from the VREG output. (We also make a standalone regulator based on this integrated circuit.)

The MP4423H regulator features an open-drain power good output, PG, which requires an external pull-up. PG drives low when the 5 V regulator’s output voltage falls below around 85% of the nominal voltage and becomes high-impedance when the output voltage rises above around 90%. The regulator circuit on the Balboa 32U4 control board can be disabled by driving the regulator shutdown pin, REGSHDN, high; this will cause 5 V logic power for the control board to be sourced from USB instead if it is available.

The Balboa 32U4 control board also contains a 3.3 V LDO that draws its power from the output of the logic power selection circuit described below. The output of the 3.3 V regulator is designated 3V3 and is used to supply the on-board inertial sensors and level shifters.

Logic power selection

The Balboa 32U4 control board’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 the batteries via the 5 V regulator, enabling the control board to safely and seamlessly transition between them. 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 control board is connected to USB.

Consequently, when Balboa 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.

The currently selected source is indicated by the STAT pin; 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).

The 5 V output of the selection circuit is used to supply the control board’s ATmega32U4 microcontroller, logic power for the DRV8838 motor drivers, and the encoders; it also optionally powers an attached Raspberry Pi.

Raspberry Pi power

By default, the control board will provide power from its 5V line to an attached Raspberry Pi. In this situation, we recommend switching on the power circuit so that the Raspberry Pi receives power from the batteries through the control board’s on-board switching regulator. Alternatively, you can use a USB wall power adapter to supply power through the control board’s USB connector, although we have sometimes observed AVR brown-out resets occurring when a board powers the Raspberry Pi this way. A typical computer USB port might not be able to supply enough current to properly power the Balboa 32U4 control board 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 control board prevents reverse current from flowing into the Balboa 32U4 control board’s 5 V supply if the Raspberry Pi is separately powered (for example, through its USB power receptacle). However, starting with the Raspberry Pi 3 Model B+, there is no corresponding ideal diode circuit on the Raspberry Pi’s USB power input, so it is possible for the control board to backfeed a USB power adapter through the Raspberry Pi. As a result, we do not recommend connecting external USB power to the Raspberry Pi while it is powered through the control board.

Backfeeding is not an issue with older Raspberry Pi versions, which do have a diode circuit on the USB power input. With Raspberry Pi versions prior to the Pi 3 B+, it is safe to have any combination of control board USB power, battery power, and Raspberry Pi USB power connected to the system.

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 control board through the 40-pin connector.

Power distribution

  • VBAT is connected to the battery contact labeled BAT+ and provides a direct connection to the battery supply.
  • VSW is the battery voltage after reverse-voltage protection and the power switch circuit.
  • VREG is the output of the on-board 5 V regulator.
  • 5V is the output of the TPS2113A power multiplexer circuit which is connected to VREG by default, but switches to 5 V USB power if VREG is too low.
  • 3V3 is the output of the 3.3 V LDO regulator.

See Section 3.7 for a diagram of the board’s power access points.

Related Products

Balboa 32U4 Balancing Robot Kit (No Motors or Wheels)
Balboa Chassis with Stability Conversion Kit (No Motors, Wheels, or Electronics)
Stability Conversion Kit for Balboa
Bumper Cage Kit for Balboa
Balboa 32U4 Control Board
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors