Power ESP32/ESP8266 with Solar Panels (includes battery level monitoring)
monitoring) This project demonstrates in detail how to provide power to an ESP32 development board using photovoltaic cells, a lithium-ion battery with a capacity of 18650 milliampere-hou…

Know the mission before touching a wire.
Understand what you are making, prepare the right tools, and make the workbench safe.
Project details
Power ESP32/ESP8266 with Solar Panels (includes battery level monitoring) is a iot project. monitoring) This project demonstrates in detail how to provide power to an ESP32 development board using photovoltaic cells, a lithium-ion battery with a capacity of 18650 milliampere-hou…
- Source pages
- 1306-1313
- Named parts
- 9
- Build goal
- Working, tested prototype
Tools you need
- Digital multimeter
- Wire stripper and side cutters
- Soldering iron with a fine tip
- Current-limited bench supply
- Computer with a data-capable USB cable
Use eye protection, good lighting, and a clean insulated surface throughout the build.
Safety precautions
- Disconnect every power source before changing a connection.
- Check component polarity, pinout, and supply voltage twice.
- Use a current limit for the first power-up.
- Keep liquids, loose metal, and uninsulated wires away from the bench.
Gather, identify, and understand every part.
Use the standardized inventory, then open What's this? to learn each part's role, advantages, limitations, handling, and specifications.
What's this?Image, role, pros, cons, handling & specifications

ESP32 or ESP8266; both are available (read ESP32 vs ESP8266)
A programmable controller that reads inputs, makes decisions, and drives the project's outputs.
What it does hereIt is the control centre and must use the documented board, pin map, supply, and logic level.
Buy / compare this part ↗Advantages
- Reprogrammable and reusable
- Large learning ecosystem
- Complex behaviour remains changeable
Limitations
- GPIO voltage and current are limited
- Some pins affect boot or communication
- Loads normally need a driver
Handling
- Disconnect power before rewiring
- Avoid static discharge
- Never power motors, relays, or pumps directly from GPIO
Specifications to verify
- Use the exact model, value, package, and rating listed for ESP32 or ESP8266; both are available (read ESP32 vs ESP8266); similar-looking parts are not always interchangeable.
- Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
What's this?Image, role, pros, cons, handling & specifications

x Mini Solar Panel (5/6V 1.2W)
A power component supplies, converts, stores, or regulates energy for the project.
What it does hereIt must provide the documented voltage, polarity, isolation, and sufficient current safely.
Buy / compare this part ↗Advantages
- Stable power improves reliability
- Current limiting protects first tests
- Regulation reduces resets and noise
Limitations
- Wrong polarity can cause immediate damage
- Underrated parts overheat
- Mains circuits require qualified supervision
Handling
- Measure output before connection
- Use a fuse or current limit
- Insulate exposed conductors
Specifications to verify
- Use the exact model, value, package, and rating listed for x Mini Solar Panel (5/6V 1.2W); similar-looking parts are not always interchangeable.
- Confirm input/output voltage, current, polarity, connector, isolation, and thermal rating.
What's this?Image, role, pros, cons, handling & specifications

Holder for Lithium-ion and Lithium-ion batteries
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for Holder for Lithium-ion and Lithium-ion batteries; similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications

Charger for a battery (optional)
A power component supplies, converts, stores, or regulates energy for the project.
What it does hereIt must provide the documented voltage, polarity, isolation, and sufficient current safely.
Buy / compare this part ↗Advantages
- Stable power improves reliability
- Current limiting protects first tests
- Regulation reduces resets and noise
Limitations
- Wrong polarity can cause immediate damage
- Underrated parts overheat
- Mains circuits require qualified supervision
Handling
- Measure output before connection
- Use a fuse or current limit
- Insulate exposed conductors
Specifications to verify
- Use the exact model, value, package, and rating listed for Charger for a battery (optional); similar-looking parts are not always interchangeable.
- Confirm input/output voltage, current, polarity, connector, isolation, and thermal rating.
What's this?Image, role, pros, cons, handling & specifications

TP4056 Charger for Lithium-Ion Batteries, Module
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for TP4056 Charger for Lithium-Ion Batteries, Module; similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications

Low-dropout regulators, also known as LDO regulators, are used to
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for Low-dropout regulators, also known as LDO regulators, are used to; similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications

regulate voltage (MCP1700-3302E)
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for regulate voltage (MCP1700-3302E); similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications

uF electrolytic capacitor
A passive component sets current, voltage, timing, filtering, or signal behaviour without adding gain.
What it does hereIts exact value and tolerance determine how the surrounding stage behaves.
Buy / compare this part ↗Advantages
- Simple and dependable
- Low cost
- Easy to measure before installation
Limitations
- A wrong value can stop or damage the circuit
- Ratings must not be exceeded
- Polarized parts require correct orientation
Handling
- Measure unclear values
- Observe capacitor polarity
- Avoid overheating leads while soldering
Specifications to verify
- Use the exact model, value, package, and rating listed for uF electrolytic capacitor; similar-looking parts are not always interchangeable.
- Confirm value, tolerance, power or voltage rating, polarity, and package size.
What's this?Image, role, pros, cons, handling & specifications
PASSIVE LEARNING VIEWnF ceramic capacitor
A passive component sets current, voltage, timing, filtering, or signal behaviour without adding gain.
What it does hereIts exact value and tolerance determine how the surrounding stage behaves.
Buy / compare this part ↗Advantages
- Simple and dependable
- Low cost
- Easy to measure before installation
Limitations
- A wrong value can stop or damage the circuit
- Ratings must not be exceeded
- Polarized parts require correct orientation
Handling
- Measure unclear values
- Observe capacitor polarity
- Avoid overheating leads while soldering
Specifications to verify
- Use the exact model, value, package, and rating listed for nF ceramic capacitor; similar-looking parts are not always interchangeable.
- Confirm value, tolerance, power or voltage rating, polarity, and package size.
Connect one verified path at a time.
Explore the named components and standardized signal flow, then use Source Check to verify exact physical pins, values, and topology before applying power.
Trace this circuit.
Power ESP32/ESP8266 with Solar Panels (includes battery level monitoring): interactive parts, standardized terminals, responsive anchored wires, student explanations, and the original circuit reference in one shared system.
Trace before wiring
Follow power, ground, inputs, processing, and outputs in that order. Never guess a pin from package shape alone.
Connect with power off
Make short, labelled connections and share a common ground only where the schematic requires it.
Inspect every joint
Check continuity, polarity, adjacent shorts, and loose connections before the first power-up.
Open all source diagrams and build views 6 visuals






Confirm the hardware-only control path.
This project does not include firmware in the source. The circuit itself provides the required behaviour.
How to connect
- Match every controller label to the circuit view and source pin map.
- Join grounds before signal wires when separate low-voltage supplies are used.
- Keep motors, relays, pumps, and other loads on a suitable driver and external supply.
Common mistakes
Reversed VCC/GND, board-label versus GPIO-number confusion, missing common ground, and charge-only USB cables.
Troubleshoot
Disconnect loads, continuity-test one path at a time, then test with a current limit.
Software preparation
No IDE, board package, library, or firmware upload is required for this project.
If you add a programmable controller as an extension, document its pin map separately.
How to upload code
The original design is implemented entirely in hardware, so proceed after verifying the circuit and supply.
Assemble, deploy, test, and troubleshoot.
Use the complete source notes in build order, then pass the final checks before calling the project finished.
Build in functional stages
- Power and regulation
- Controller or processing stage
- Inputs and sensors
- Outputs and loads
- Enclosure and strain relief
Power up safely
- Inspect unpowered continuity first
- Apply the lowest safe current limit
- Measure supply rails before signals
- Add one load at a time
- Record expected and actual results
Work from simple to complex
- Confirm power, ground, polarity, and orientation
- Compare each pin with the source
- Test inputs separately from outputs
- Replace only one variable at a time
- Power off before every correction
Follow the documented instructions.
These notes come from this project's source and remain in their original order.
Project overview
Project build notemonitoring) This project demonstrates in detail how to provide power to an ESP32 development board using photovoltaic cells, a lithium-ion battery with a capacity of 18650 milliampere-hours (mAh), and a TP4056 battery charger module. The circuit that we are going to build is compatible not only with the ESP8266 but also with any other microcontroller that operates on 3.3V. When you are using solar panels to power your ESP32, it may be beneficial to make use of its deep sleep capabilities in order to save power. Our project
will teach you everything you need to know about using the ESP32 to achieve a deep sleep state.
Parts Required
Project build noteTo power the ESP32 or ESP8266 with solar panels, we’ll use the following
parts
Project build noteESP32 or ESP8266; both are available (read ESP32 vs ESP8266) 2x Mini Solar Panel (5/6V 1.2W) 18650 Holder for Lithium-ion and Lithium-ion batteries Charger for a battery (optional) TP4056 Charger for Lithium-Ion Batteries, Module Low-dropout regulators, also known as LDO regulators, are used to regulate voltage (MCP1700-3302E) 100uF electrolytic capacitor 100nF ceramic capacitor
Voltage divider for the battery monitor, which is optional
Project build note27k Ohm resistor 100k Ohm resistor ESP32 Solar Powered – Circuit Overview The following diagram shows how the circuit to power the ESP32 with solar panels works
When exposed to direct sunlight, the solar panels produce an output of between 5V and 6V. Through the TP4056 battery caharger module, the solar panels are able to supply power to the lithium battery. This module is in charge of charging the battery while also preventing it from being overcharged. When it is fully charged, the lithium battery has a voltage output of 4.2V. In order to get 3.3V from the output of the battery, you will need to use a low dropout voltage regulator circuit, such as MCP1700- 3302E. The ESP32 will receive its power from the output of the voltage regulator, which is connected to the 3.3V pin. Solar Panels The solar panels that we are utilizing have an output voltage that can reach anywhere between 5V and 6V. It is possible to use several solar panels in parallel in order to increase the rate at which your battery is charged. For the purpose of this demonstration, we will be utilizing two miniature solar panels, which are depicted in the following figure.
Solder the plus sign (+) terminal of one solar panel to the plus sign (+) terminal of the other solar panel so that the panels can be wired in parallel. Repeat step one with the terminals marked with a minus sign. When you wire solar panels in parallel, you will get the same output voltage but twice as much current as when you wire them in series (for identical solar panels). The following illustration demonstrates that the solar panels produce an output of approximately 6 volts. TP4056 Charger Module The TP4056 lithium battery charger module is equipped with circuit protection, which protects against battery over-voltage as well as connections with reverse polarity. When it is charging the battery, the TP4056 module will illuminate a red LED. Once the battery has reached its maximum capacity, the module will illuminate a blue LED. Follow the instructions on the wiring diagram that is provided below to connect the solar panels to the TP4056 lithium battery charger module. Connect the terminals that have a positive charge to the pad that is labeled IN+, and connect the terminals that have a negative charge to the pad that is labeled IN-.
The positive terminal of the battery holder should then be connected to the B+ pad, and the negative terminal of the battery holder should be connected to the B- pad. The outputs of the battery are denoted by the symbols OUT+ and OUT-. When completely charged, the voltage produced by these lithium batteries can reach 4.2 volts (although they have 3.7V marked in the label). We need a voltage regulator circuit so that we can get 3.3V from the output of the battery so that we can power the ESP32 through its 3.3V pin. Voltage Regulator It is not a good idea to use a typical linear voltage regulator to drop the voltage from 4.2V to 3.3V because, as the battery discharges to a lower voltage, such as 3.7V, your voltage regulator would stop working because it has a high cutoff voltage. Alternatively stated, it is not a good idea to use a linear voltage regulator to drop the voltage. It is necessary to make use of a low-dropout regulator, also known as an LDO for short, which is able to regulate the output voltage in order to drop the voltage in a battery pack effectively.
After doing some research on LDOs, we found that the MCP1700-3302E is the most suitable for what we want to accomplish. There is also another viable option available, which is the HT7333-A. Any LDO that has specifications that are comparable to those of these two is also a good alternative. Your low dropout voltage regulator (LDO) ought to have similar specifications to your other regulators in terms of its output voltage, quiescent current, output current, and low dropout voltage. In order to smooth out the peaks in the output voltage, the LDOs should each have a ceramic capacitor and an electrolytic capacitor connected in parallel to GND and Vout. Both an electrolytic capacitor with a value of 100 uF and a ceramic capacitor with a value of 100 nF are being utilized here. The voltage regulator's Vout pin needs to output 3.3V for proper operation. This is the pin that supplies power to either the ESP32 or the ESP8266. After making sure that the Vout pin of the voltage regulator is receiving the correct voltage, you can finally power the ESP32. Before doing so, however, you should make sure that the Vout pin is receiving the correct
voltage. Connect the GND pin to the GND pin, as well as the Vout pin to the 3.3V pin on the ESP32. You can continue to use the same circuit even if you have switched to using an ESP8266 instead. Connect the output of the MCP1700-3302E to the 3.3V pin on the ESP8266, and connect GND to GND on both devices Battery Voltage Level Monitoring Circuit If you are using batteries to power your ESP32, or solar power like in this instance, it is very helpful to be able to monitor the amount of charge the batteries have. One way to accomplish this is to use an analog pin on the ESP32 to perform a reading of the output voltage of the battery. However, when fully charged, the battery that we are using here is capable of producing a voltage of up to 4.2V; however, the GPIOs on the ESP32 only operate at 3.3V. Therefore, in order for us to read the voltage coming from the battery, we are going to need to add a voltage divider.
The voltage divider formula is as follows
Project build noteVout = (Vin*R2)/(R1+R2)
So, if we use R1=27k Ohm, and R2=100k Ohm, we get: Vout = (4.2*100k)/(27k + 100k) = 3.3V Therefore, when the battery has been fully charged, the Vout will output 3.3V, which we can read using a GPIO on an ESP32. Using solar panels, a lithium battery, and a TP4056 battery charger module, we have demonstrated in this project how you can provide power to an ESP32 or an ESP8266 microcontroller. The circuit that we've shown you can also be used to power other kinds of microcontrollers, provided that those microcontrollers need 3.3V to function.
You built Power ESP32/ESP8266 with Solar Panels (includes battery level monitoring).
You followed the full workflow from understanding the mission to testing the finished project. That is a real engineering achievement - well done.
Browse all 500 projects