There are three ways to power your Metro:
1) Power with a USB Cable connected to a power source.
2) Use the DC Jack connected to a power source up to 12volts.
3) Connect a 4.2/3.7V Lithium Polymer (LiPo/LiPoly) or Lithium Ion (LiIon) battery to the JST jack. This lets you run the Metro without wires, untethered.
If you're running off of a battery, chances are you want to know what the voltage is. That way you can tell when the battery needs recharging.
In this section, you'll connect a battery to your Metro, and configure a battery monitor component from Adafruit IO to report the board's battery voltage and charge percentage.
The MAX17048 battery monitor (highlighted in red) is located next to the 3.7V Lipoly label on the board silk.
Adafruit highly advises using Adafruit batteries. They have the correct wiring and built in short circuit protection. Batteries from other sources may have incorrect wiring and/or no short protection.
You can plug any 250mAh or larger 3.7/4.2V Lipoly battery into the JST 2-PH port (identified on the pinouts page and shown in the image above) to power your Metro and charge the battery. The battery will charge when either USB power or the DC power socket is used. If the battery is plugged in and an external power source is plugged in, the Metro will power itself from USB or the DC socket and charge the battery up. It uses the highest external power source.
For more information about powering your Metro, visit the Power Management Page in this guide.
Add Battery Monitor Component to Adafruit IO
From your device page, click the New Component (or +) button.
Search for the component name by entering MAX17048
into the text box on the component picker, the list of components should update as soon as you stop typing.
Since WipperSnapper supports such a large number of components, there is keyword filtering. Try searching for various keywords, like:
- component names:
aht20
,servo
,buzzer
,button
,max17048
, etc - sensor types:
light
,temperature
,pressure
,humidity
, etc - interface:
i2c
,uart
,ds18x20
,pin
, etc (also I2C addresses e.g.0x44
) - vendor:
Adafruit
,ASAIR
,Infineon
,Bosch
,Honeywell
,Sensirion
, etc
There are added product and documentation links for every component, follow the links beneath the component descriptions to be taken to the appropriate product page or Learn Guide.
Select the MAX17048 from the list of results to go to the component configuration page.
There will be a back button if you select the wrong component, and you can use the Edit component icon (⚙️) on the device page to update the component configuration in the future.
The Create Component form should load, used for component configuration, with the MAX17048's I2C sensor address listed along with the sensor's settings.
On the Create MAX17048 Component form, there are two options:
- Enable the battery cell voltage reading. This will cause the Metro to report the status of its battery expressed in Volts.
- Enable the battery cell percent reading. This will cause the Metro to report the status of its battery expressed as a percent.
Then, the battery measurement will be read and sent to Adafruit IO every "Send Every" period.
In the screenshot below, the battery monitor is configured to report its battery cell voltage and battery cell percentage back to Adafruit IO every 30 seconds.
After configuring the MAX17048 component, click Create Component.
Every 30 seconds, the Metro uses the MAX17048 component to measure its battery cell percent and voltage, and report it back to Adafruit IO.
Now that you have a battery monitor component set up on Adafruit IO, you may follow this guide to configure an Adafruit IO Action for receiving an SMS text message when your Metro's battery level is below a threshold.
Text editor powered by tinymce.