This QT Py BFF has a bunch of features packed into a cute little board. This page will explain the hardware!

Power Slide Switch

The power slide switch, located in the middle of the right side of the board, turns the BFF on or off, but only when the QT Py is NOT plugged into USB power.

Battery JST Connector

The battery JST connector, located in the middle of the left side of the board, enables you to plug in any standard 3.7V/4.2V lithium polymer or lithium-ion rechargeable battery to the BFF.

For use with Adafruit LiPoly/LiIon batteries only! Other batteries may have different voltage, chemistry, polarity, or pinout.

Charge LED

The charge LED, located in the upper left corner of the board, lights up when the battery is charging. Charging occurs only when the QT Py is plugged into USB power.

Battery Monitor Pin and Jumper

Pin A2, located to the left of center along the top edge of the board, is connected to the simple voltage divider, which will let your firmware detect basic modes. It measure the 5V line which is after a schottkey diode. If the voltage is over 4.0V, it is probably plugged into USB. If the voltage is 3.9V or below, its probably running on the Lipoly battery and you can roughly determine the battery state.

There are a pair of jumper pads, located to the right of center, below the pins along the top edge. These pads are connected to pin A2, between the pin and the voltage divider. In the event that you want to use pin A2 for something other than battery monitoring, you can cut the trace between these pads to disable monitoring on pin A2. Solder the pads back together to enable monitoring again.

Charge Chip and Voltage Divider

The MCP73831 lipo charge chip, located near the center of the board, will charge up the battery at 200mA max rate. Charging occurs only while the QT Py is plugged into USB, and will happen regardless of the status of the slide switch. When the chip is charging a battery, the charge LED will light up.

The voltage divider, located below the A3 pin label on the BFF silk, is connected between A2 and 5V via the cathode side of a diode. It allows for simple monitoring of voltage levels, which can indicate whether the QT Py is running off USB, or being powered by a battery plugged into the BFF.

To obtain the voltage level from A2 using CircuitPython, run the following code.

import time
import board
import analogio

analog_pin = analogio.AnalogIn(board.A2)

def get_voltage(pin):
    return (pin.value / 65535) * 3.3

while True:

This guide was first published on Apr 08, 2022. It was last updated on Mar 08, 2024.

This page (Pinouts) was last updated on Mar 08, 2024.

Text editor powered by tinymce.