Professional Documents
Culture Documents
D1 Mini Battery Shield en
D1 Mini Battery Shield en
Introduction 3
Specifications 4
Ports 5
How to use Jumper J1 6
How to use Jumper J2 7
Battery polarity 8
Test Example : Measuring battery voltage 9
Introduction
The D1 Mini Battery shield offers a convenient solution for powering the D1
Mini module using Li-ion/Li-Po battery. It incorporates an integrated DC-DC
boost (step-up) converter that efficiently raises the battery voltage from 3.7V
to 5V, providing a reliable power source for both the D1 Mini module and its
associated shields with a robust current supply of up to 1A. Furthermore, this
shield simplifies the battery replenishment process by allowing you to recharge
it effortlessly. When your battery is low, a simple connection to a USB power
source through a microUSB cable initiates automatic recharging. Additionally,
the shield features two LEDs that act as visual indicators, signaling the ongoing
battery charging status and marking the moment when the charging process
has been successfully completed.
On the following pages, we will introduce you to how to use and how to set-up
this handy device.
Specifications
Dimension 28 x 25 x 8 mm
Overview
Components
Name Description
J1 is a jumper that controls the maximum charging current for your shield
battery when it's being charged. It has two settings:
● 0.5A : This is the default setting. When J1 is not soldered, the maximum
charging current is set to 0.5 amperes. This means that when you're
charging the battery, it will charge at a rate of up to 0.5A.
Ultimately the best charging current depends on your specific needs and how
you prioritize factors like charging speed, battery longevity, and safety. It's
advisable to refer to the manufacturer's recommendations and consult the
datasheets or user manuals of the battery and charging components for the
most accurate guidance.
How to use Jumper J2
The D1 mini already has an internal voltage divider that connects the A0 pin to
the ADC of the ESP8266 chip. This is a 220 k resistor over a 100 k resistor.
By adding 130K of the shield we will get the divider factor equal to :
You should be mindful of the correct orientation when connecting the battery to the
shield. Align the connector JST PH2-2mm direction to the shield in the right
direction.
Also you can solder the battery directly to the shields, there are markings or labels to
indicate the positive (+) and negative (-) terminals. Ensure that you align the battery's
positive terminal with the positive marking on the shield and the negative terminal
with the negative marking.
Connecting the battery in reverse polarity can damage the shield and the D1 Mini, so
it's essential to get it right.
Test Example : Measuring battery voltage
It is very convenient to know the remaining voltage level of the battery in order
to predict the recharge (or replacement). The D1 Mini module has an analog
input that can be used to monitor the charge level of the battery.
First Step connects A0 to the battery, through soldering Jumper J2.
Code :
#define sensivity (4.2 / 1023.0)
#define maxVoltage 4.2
void setup() {
Serial.begin(9600);
}
void loop() {
float sensorValue = analogRead(A0);
Serial.print("Raw adc: ");
Serial.println(int(sensorValue));
delay(1000);
}
This code reads an analog voltage from a sensor connected to pin A0, then
converts and prints the raw analog-to-digital conversion value, the voltage in
volts, and the percentage of the maximum voltage (4.2V) that the battery
reading represents. It continually loops and prints these values to the serial
monitor every second. The sensitivity is used to convert the raw ADC value to
voltage.
You've done it, you can now use your module for your projects :)
Now it is time to learn and make the Projects on your own. You can
do that with the help of many example scripts and other tutorials,
which you can find on the internet.
If you are looking for the high quality microelectronics and
accessories, AZ-Delivery Vertriebs GmbH is the right company to get
them from. You will be provided with numerous application
examples, full installation guides, eBooks, libraries and assistance
from our technical experts.
https://az-delivery.de
Have Fun!
Impressum
https://az-delivery.de/pages/about-us