The Wemos D1 Battery Shield is a compact and efficient power management module designed specifically for the Wemos D1 Mini development board. It allows users to power their Wemos D1 Mini using a rechargeable lithium-ion or lithium-polymer battery, making it ideal for portable and low-power IoT applications. The shield includes a battery connector, charging circuitry, and a USB port for charging the connected battery.
Below are the key technical details of the Wemos D1 Battery Shield:
Specification | Details |
---|---|
Input Voltage (USB) | 5V (via Micro-USB port) |
Battery Type | Lithium-ion or Lithium-polymer (LiPo) |
Battery Connector | JST 2.0 (PH2.0) |
Charging Current | 500mA (default) |
Output Voltage | 3.3V or 5V (regulated) |
Output Current | Up to 1A |
Charging Indicator LEDs | Red (charging), Blue (fully charged) |
Dimensions | 34.2mm x 25.6mm x 8mm |
The Wemos D1 Battery Shield has a simple pin layout that matches the Wemos D1 Mini. Below is a table describing the key pins:
Pin | Description |
---|---|
5V | Provides a regulated 5V output from the battery or USB input. |
3V3 | Provides a regulated 3.3V output from the battery or USB input. |
GND | Ground connection. |
BAT | Direct connection to the battery's positive terminal. |
USB | Direct connection to the USB input voltage (5V). |
The Wemos D1 Mini can be programmed using the Arduino IDE. Below is an example code snippet to read the battery voltage using the BAT
pin:
// Example code to read battery voltage on Wemos D1 Mini
// Ensure the BAT pin is connected to an analog input pin (e.g., A0).
void setup() {
Serial.begin(115200); // Initialize serial communication at 115200 baud
}
void loop() {
int rawValue = analogRead(A0); // Read the analog value from the BAT pin
float voltage = (rawValue / 1023.0) * 3.3 * 2;
// Convert raw value to voltage. Multiply by 2 due to voltage divider.
Serial.print("Battery Voltage: ");
Serial.print(voltage);
Serial.println(" V");
delay(1000); // Wait for 1 second before the next reading
}
Note: The Wemos D1 Mini has a built-in voltage divider on the A0 pin, so the input voltage is scaled down by a factor of 2. Adjust the calculation accordingly.
Battery Not Charging
No Power Output
Overheating During Charging
Incorrect Voltage Readings
Can I use the shield without a battery? Yes, the shield can power the Wemos D1 Mini directly from the USB input without a battery.
What happens if both USB and battery are connected? The shield will prioritize USB power for the Wemos D1 Mini and charge the battery simultaneously.
Can I use a different type of battery? No, only lithium-ion or lithium-polymer batteries with a nominal voltage of 3.7V are supported.
What is the maximum battery capacity supported? There is no strict limit on capacity, but charging time will increase with higher-capacity batteries.
By following this documentation, you can effectively integrate the Wemos D1 Battery Shield into your projects and ensure reliable performance.