A board with an 8266 and a battery!

In May of 2021 I bought 4 boards from AliExpress for $4.55 each. They were listed as "for Wemos D1 Mini WiFi Module ESP WROOM 02 Motherboard Integrated ESP8266 with 18650 Battery Slot for NodeMCU".

So far I have had no luck searching and finding schematics.

One side of the board has a fixture to hold an 18650 Li-ion battery and the other side has a "ESP WROOM O2" module and a variety of supporting parts.

Take care not to insert the battery backwards as there is no protection and damage will occur.

The board has a USB to serial chip (a CP2102), voltage regulators, something that looks like it might be a charge controller for the 18650, 3 LED, an on/off slide switch, and a RST and "FLASH" button. Here is the description from the listing:

One site indicates that GPIO16 controls the LED that is all by itself near the RST button. A solder jumper next to this LED is available (and shipped "open"), one note gives the cryptic annotation "Solded this when sleep mode, GPIO16 -> RST". A schematic sure would help.

The development board integrates the ESP8266 18650 battery. A standard L G 3000mah 18650 battery can run for 17 hours.

What is it?
You can call it "WiFi battery". I am going to make it easier to develop ESP8266 ESP8266 project to add 18650 battery.
Why are you doing?
When you do some ESP8266 items you must be hated to add power to power. This miniature board can solve this problem. LG 3000mah 18650 battery can make ESP8266 run for 17 hours or more.
What makes it special?
· With nodemcu.
· 18650 charging system integration.
· Indication LED (green means full of red means · Charging) Charge and work can be done at the same time.
· 1 switch control power supply.
· 1 SMT connector available for sleep mode · 1 additional LED programmable (with gpio16 [do])
· 0.5a charge current
1A output
· Overcharge protection
· Over discharge protection
· 10 digital pin read / write / interrupt / PWM / I2C / line support (except D0)
· 1 analog input to be careful + -.
If the battery is in the wrong direction, the charging chip will be destroyed.
Note:This product does not contain 18650 battery.
Package included:
1*for WeMos D1 Esp-Wroom-02 Motherboard Mini-WiFi Nodemcu Module ESP8266 18650 Battery(battery not included)
Here is a pin list:
Pin No	Pin Name	ESP-WROOM-02 Pin	ESP-WROOM-02 FUNCTION
1	A0	16	TOUT / A0
2	D1	14	IO5 / I2C-SCL
3	D2	10	IO4/I2C-SDA
4	D3	8	IO0
5	D4	7	IO2 / UART1_TXD
6	D5	3	IO14 / HSPI_CLK
7	D6	4	IO12 / HSPI_MISO
8	D7	5	IO13 / HSPI_MOSI / UART_CTS
9	D8	6	IO15 / HSPI_CS / UART_RTS
10	RX	11	UART0_RXD / IO3
11	TX	12	UART0_TXD / IO1
12	3V3	1
13	5V	N/A
14	GND	9

Some experiments

I grab a micro-USB cable and with no battery installed, I connect it to my linux desktop. A green LED near the USB comes on (a power indicator apparently) and a very dim red LED nearby begins blinking at about 1 Hz. My linux log file shows nothing at all when I plug it in (I would expect the USB to serial chip to identify itself.)

I disconnect the USB cable and install an 18650 cell. With the slide switch off there is no indication of life. Nothing when I move the switch to the on position either. This is with a recently charged cell that measures 4.2 volts. However, with a battery in place and the switch on, we see the USB to serial chip as ttyUSB2.

I find a partly discharged battery (it measures 3.87 volts), install it, and connect the USB cable. Now the LED that was previously blinking gives me a solid red indicating it is charging. Supposedly the green LED will come on when it is fully charged. Also, with the battery in place linux sees the CP2102 chip! Albeit only briefly. During the brief time it was online, it offered to let me talk to it on ttyUSB2. I'll leave it a while and come back later to see if it gets charged up. The description says "charging and working could be at the same time" Before long the green LED comes on (along with the red LED). The battery measures 4.1 volts now.

With the switch on, it stays up as ttyUSB2. I run the new esptoolv3 using the Makefile in my blink3 project and get:

make info
esptoolv3 -p /dev/ttyUSB2 read_mac
esptool.py v3.0
Serial port /dev/ttyUSB2
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 40:f5:20:24:8b:ef
Uploading stub...
Running stub...
Stub running...
MAC: 40:f5:20:24:8b:ef
Hard resetting via RTS pin...
esptoolv3 -p /dev/ttyUSB2 flash_id
esptool.py v3.0
Serial port /dev/ttyUSB2
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 40:f5:20:24:8b:ef
Uploading stub...
Running stub...
Stub running...
Manufacturer: 5e
Device: 6015
Detected flash size: 2MB
Hard resetting via RTS pin...
After some work, I am able to rebuild and flash my "blink3" demo and see the LED that is wired to GPIO16 start blinking! The work is because GPIO16 is special and unique. Unlike all the other GPIO pins on the esp8266 it is a different piece of hardware, in particular (which isn't important here) it is an ultra low power timer that can be used to awaken the processor when it puts itself into deep sleep.

So after flashing the blink demo, I can disconnect the USB cable, flip the power switch off and back on and it continues to blink. Very good.

What have we learned