Battery + USB Power
We wanted to make our Feather boards easy to power both when connected to a computer as well as via battery.
There's two ways to power a Feather:
- You can connect with a USB cable (just plug into the jack) and the Feather will regulate the 5V USB down to 3.3V.
- You can also connect a 4.2/3.7V Lithium Polymer (LiPo/LiPoly) or Lithium Ion (LiIon) battery to the JST jack. This will let the Feather run on a rechargeable battery.
When the USB power is powered, it will automatically switch over to USB for power, as well as start charging the battery (if attached). This happens 'hot-swap' style so you can always keep the LiPoly connected as a 'backup' power that will only get used when USB power is lost.
The above shows the USB C connector (left center), the LiPoly JST connector (top left), as well as the changeover diode (to the right of the JST jack), the 3.3V regulators (to the left of the JST connector and the USB C connector) and the charging circuitry (below the JST connector). Towards the back of the board, next to the terminal block, is the separate control transistor for the NeoPixels and I2S amplifier.
There's also a CHG LED next to the USB jack, which will light up while the battery is charging. This LED might also flicker if the battery is not connected, it's normal.
Power Supplies
You have a lot of power supply options here! We bring out the BAT pin, which is tied to the LiPoly JST connector, as well as USB which is the +5V from USB if connected. We also have the 3V pin which has the output from the 3.3V regulator. We use a 500mA peak regulator. While you can get 500mA from it, you can't do it continuously from 5V as it will overheat the regulator.
Measuring Battery
If you're running off of a battery, chances are you wanna know what the voltage is at! That way you can tell when the battery needs recharging. LiPoly batteries are 'maxed out' at 4.2V and stick around 3.7V for much of the battery life, then slowly sink down to 3.2V or so before the protection circuitry cuts it off. By measuring the voltage you can quickly tell when you're heading below 3.7V.
Other Feather boards sometimes have battery monitoring built in…but with few analog inputs on the RP2040 chip, this is optionally handled with extra components: two 100KΩ resistors and one of the analog pins…
The two 100KΩ resistors are connected in series. One end goes to the BAT pin, other end to GND, and then the center point between the two resistors goes to any analog pin you’d like to use (A0 through A3). The diagram shows A3.
The two resistors form a voltage divider; the center point will be one half the battery voltage. It’s done this way because the raw BAT voltage would exceed the chip’s 3.3V operating voltage.
In Arduino, you can read this pin’s voltage, then double it, to get the battery voltage:
// Arduino Example Code #define VBATPIN A3 float measuredvbat = analogRead(VBATPIN); measuredvbat /= 1023; // Scale down to 0.0 to 1.0 measuredvbat *= 3.3; // Multiply by 3.3V, our reference voltage measuredvbat *= 2; // Resistors divide by 2, so multiply back Serial.print("VBat: " ); Serial.println(measuredvbat);
For CircuitPython, here’s a get_voltage()
helper function to do the math for you. All you have to do is call the function, provide the pin and print the results:
# SPDX-FileCopyrightText: 2018 Kattni Rembor for Adafruit Industries # # SPDX-License-Identifier: MIT import board import analogio vbat_voltage = analogio.AnalogIn(board.A3) def get_voltage(pin): return pin.value / 65535 * 3.3 * 2 battery_voltage = get_voltage(vbat_voltage) print("VBat voltage: {:.2f}".format(battery_voltage))
ENable pin
If you'd like to turn off the 3.3V regulator, you can do that with the EN(able) pin. Simply tie this pin to Ground and it will disable the 3V regulator. The BAT and USB pins will still be powered.
External Power Pin
The Feather is equipped with an I2S amp, servo header and NeoPixel terminal block output that are both connected to their own regulator. Unlike the one controlled by the ENable pin, this is controlled by GPIO. It is not enabled by default in CircuitPython and Arduino. You will need to enable it in your code to use these pins. You can also disable it manually for low power usage. The external power pin is located on GPIO23 and is accessed as EXTERNAL_POWER
in CircuitPython and PIN_EXTERNAL_POWER
in Arduino.
Alternative Power Options
The two primary ways for powering a feather are a 3.7/4.2V LiPo battery plugged into the JST port or a USB power cable.
If you need other ways to power the Feather, here's what we recommend:
- For permanent installations, a 5V 1A USB wall adapter will let you plug in a USB cable for reliable power
- For mobile use, where you don't want a LiPoly, use a USB battery pack!
- If you have a higher voltage power supply, use a 5V buck converter and wire it to a USB cable's 5V and GND input
Here's what you cannot do:
- Do not use alkaline or NiMH batteries and connect to the battery port - this will destroy the LiPoly charger
- Do not use 7.4V RC batteries on the battery port - this will destroy the board
The Feather is not designed for external power supplies - this is a design decision to make the board compact and low cost. It is not recommended, but technically possible:
- Connect an external 3.3V power supply to the 3V and GND pins. Not recommended, this may cause unexpected behavior and the EN pin will no longer work. Also this doesn't provide power on BAT or USB and some Feathers/Wings use those pins for high current usages. You may end up damaging your Feather.
- Connect an external 5V power supply to the USB and GND pins. Not recommended, this may cause unexpected behavior when plugging in the USB port because you will be back-powering the USB port, which could confuse or damage your computer.
You just read above that you CANNOT use alkaline or NiMH batteries and connect to them to the battery port because this will destroy the LiPoly charger. However, on this particular Feather you can disable the charging circuit.
On the back of the board, behind the USB-C port, is the LiPo charge jumper. It is labeled LiPo Chg on the board silk. If you cut this jumper, it disconnects the lipoly battery charging circuit from the JST PH connector. As a result, you can safely use AA and AAA battery packs after cutting the jumper.
Text editor powered by tinymce.