
Water level esp8266-esphome solar charing
Hidayatur-rahman/Solar-Water-Level-Monitor-ESP8266-ESPHome-
A solar-powered water tank level monitoring system built around the ESP8266 (ESP-12E), designed in KiCad and running on ESPHome

A solar charge controller with MPPT and a 5V USB-C output. You wire a 6V solar panel into one terminal block and a 1S lithium pack into the other, and it charges the pack at up to 2.4A while holding the panel at the…
Solar charger 3 is an open-source printed circuit board by Vaaxs, from the Vaaxs/solarCharger repository on GitHub. It is a 2-layer board of 90 × 60 mm with 34 parts on 27 nets, routed with 181 tracks and 29 vias.
It is built around the CN3791, USB-TYPE-C-019 and WJ25C-B-7.62-02P-13-00A, with the SWPA4030S100MT, SMNR4020-2.2UH and AOD4185 among its other parts. Its parts include 11 resistors, 7 capacitors, 3 ICs, 3 diodes and 2 connectors. It belongs with the power boards of this library.
A solar charge controller with MPPT and a 5V USB-C output. You wire a 6V solar panel into one terminal block and a 1S lithium pack into the other, and it charges the pack at up to 2.4A while holding the panel at the voltage where it puts out the most power, then boosts back up to 5V for the USB port.
2 layer board, 90 x 60mm, 30 components, done in KiCad 10.

Around 700 million people don't have reliable electricity, but phones are basically everywhere, so a solar charger is one of the few things you can build where the problem and the thing you're making are both real.
The part that makes this worth building instead of just buying one is the MPPT. A solar panel has one specific voltage where it gives you the most power, and a dumb charger ignores that and just pulls the panel down until it stalls out. You end up losing a big chunk of what the panel could have given you, and it gets worse in weak light, which is when you actually need it. This board watches the panel voltage through a divider and holds it at that point instead.
I also didn't want it tied to one specific panel. Anything in the input range works, so someone with a different panel can still use the board.
solar panel --> P1 --> CN3791 MPPT buck charger --> P2 --> 1S3P 18650 pack
(Q1, L1, D1, R5) |
v
USB-C out <-- TPS61023 boost <-- SW1 enable
U3 (U2, L2)U1 is the CN3791, a buck MPPT charger made for solar. It holds the panel at its maximum power point and does CC/CV charging into the pack. Q1 is the high side switch for the buck and R5 sets the charge current, since the chip regulates to 120mV across it.
U2 is the TPS61023, which takes the single cell back up to 5V. SW1 turns it on and off so the board isn't draining the pack when nothing is plugged in.
U3 is the USB-C receptacle. All four VBUS contacts and all four ground contacts are wired, which is how the current gets shared instead of going through one pin.
| what | value | set by |
|---|---|---|
| MPPT setpoint | 5.51V | 1.205 x (1 + R1/R2), R1 357k, R2 100k |
| Panel you need | about 6.9V Voc, 11W or more | setpoint divided by 0.8 |
| Charge current | 2.4A | 120mV / R5, R5 is 0.05 ohm |
| Output voltage | 5.06V | 0.595 x (1 + R14/R15), R14 750k, R15 100k |
| CC pull ups | 56k | R9 and R16, which is what tells a phone it can draw default USB power |
If you want to use a different panel, change R1 and R2. If you want a different charge current, change R5.
Schematic:

PCB:

The buck switching loop, with Q1, D1 and L1 kept as tight as I could get them and each ground return taking its own via right at the pad:

The boost section around U2 and L2:

Bottom layer with the ground pour:

3D:

README.md this
JOURNAL.md build log with everything that went wrong
BOM.csv parts list with links
hardware/
Solar_charger_3.kicad_pro project file
Solar_charger_3.kicad_sch schematic
Solar_charger_3.kicad_pcb board
solar-charger.pretty/ footprints for the 4 parts KiCad doesn't have
solar-charger.3dshapes/ 3D models for those same parts
gerbers.zip manufacturing files
images/ screenshotsSend hardware/gerbers.zip to any fab. 2 layer, 1.6mm, 1oz copper, HASL or ENIG. The tightest copper gap on the board is 0.150mm which is inside JLCPCB's 0.127mm minimum so you don't need anything special.
Everything is in BOM.csv with links. Get spares of U1, U2 and U3, those are the three most likely to get wrecked by a bad solder joint.
Do U1 and U2 first while the board is still empty, they're the hardest. U2 is a SOT-563 with 0.5mm pitch so check it under magnification for bridges after. Then all the resistors and capacitors, then Q1, D1, L1 and L2. Q1's tab needs enough heat to actually wet. Then U3, and remember the four shield posts are through hole and carry ground. Then P1, P2 and SW1 last since they're through hole.
Three 18650 cells in parallel with one 1S BMS across the whole pack.
Use unprotected cells for this. If you parallel three cells that each have their own protection board, the boards don't coordinate with each other and they fight. One BMS for the pack is the right way to do it.
Check P1 and P2 for shorts between + and - first. Then put a bench supply on P1 at 6V with the current limit at 500mA. The board should only draw a few mA. Check that U1 pin 9 reads your input voltage, and that U1 pin 6 sits near 1.205V once the loop is regulating.
Only after that, connect the pack to P2 with SW1 off. Then switch it on and measure the USB-C output, you should get 5.0V give or take 0.1V.
Four M3 holes, 4mm in from each corner. It's meant to bolt onto the back of the panel.
P1 pin 1 is panel +, pin 2 is panel -. P2 pin 1 is pack +, pin 2 is pack -.
The panel and the battery are not on the board. They're external and they wire into the two screw terminals.
The board hasn't been fabricated or tested yet, everything here is verified in KiCad only.
Three of the part number fields in the schematic are stale and don't match the footprint. L1's MPN field names a 4x4mm 1.5A inductor when the correct one is in the Value field, SW1's MPN names a completely different switch, and U3's LCSC code needs checking against the XKB footprint. Order from BOM.csv and not from those fields.
There are four cosmetic silkscreen warnings left in DRC that don't affect anything electrically.
There's no reverse polarity protection on P1, so wire the panel the right way round.
No enclosure yet, and no battery percentage readout. Both are below.
A fuel gauge board. A MAX17048 across the pack with a small OLED, taking power and I2C off the P2 terminals so the main board doesn't have to change at all. It'd sit behind a momentary button, because an OLED left on all the time would quietly eat whatever the panel is bringing in.
An I-V curve tracer, so I can actually measure a panel's real maximum power point with a swept load and a current sensor, and then check that the CN3791 is parking on it instead of just assuming it does.
U1 is the Consonance CN3791 and U2 is the TI TPS61023. Both were designed in from their datasheets.
Footprints and 3D models come from the KiCad standard libraries, except the terminal blocks, the slide switch and the USB-C connector, which are in hardware/solar-charger.pretty and hardware/solar-charger.3dshapes in this repo.
MIT
| Qty | Value | Footprint | References |
|---|---|---|---|
| 3 | 100k | Resistor_SMD:R_0805_2012Metric | R2, R12, R15 |
| 2 | 10uF/25V | Capacitor_SMD:C_1206_3216Metric | C6, C7 |
| 2 | 1k | Resistor_SMD:R_0805_2012Metric | R3, R4 |
| 2 | 56k | Resistor_SMD:R_0805_2012Metric | R9, R16 |
| 2 | WJ25C-B-2P | solar-charger-library:TerminalBlock_Wuerth_691311400102_P7.62mm | P1, P2 |
| 1 | 0.05R | Resistor_SMD:R_2512_6332Metric | R5 |
| 1 | 100nF | Capacitor_SMD:C_0805_2012Metric | C1 |
| 1 | 10uF | Capacitor_SMD:C_0805_2012Metric | C9 |
| 1 | 10uH SRN8040TA-100M | Inductor_SMD:L_Bourns_SRN8040TA | L1 |
| 1 | 120R | Resistor_SMD:R_0805_2012Metric | R17 |
| 1 | 2.2uH NR4018T2R2M | Inductor_SMD:L_Taiyo-Yuden_NR-40xx | L2 |
| 1 | 220nF | Capacitor_SMD:C_0805_2012Metric | C2 |
| 1 | 22uF | Capacitor_SMD:C_0805_2012Metric | C5 |
| 1 | 22uF | Capacitor_SMD:C_1206_3216Metric | C8 |
| 1 | 357k | Resistor_SMD:R_0805_2012Metric | R1 |
| 1 | 750k | Resistor_SMD:R_0805_2012Metric | R14 |
| 1 | AOD4185 | Package_TO_SOT_SMD:TO-252-3_TabPin2 | Q1 |
| 1 | CN3791 | Package_SO:SSOP-10_3.9x4.9mm_P1.00mm | U1 |
| 1 | KT-0603R | LED_SMD:LED_0603_1608Metric | LED1 |
| 1 | LED (yellow-green) | LED_SMD:LED_0805_2012Metric | LED2 |
| 1 | OS102011MS2Q | solar-charger-library:SW_Slide_1P2T_CK_OS102011MS2Q | SW1 |
| 1 | SS34_C8678 | Diode_SMD:D_SMA | D1 |
| 1 | TPS61023DRLR | Package_TO_SOT_SMD:SOT-563 | U2 |
| 1 | USB-C 16P | solar-charger-library:USB_C_Receptacle_XKB_U262-16XN-4BVC11 | U3 |
The 30 most common of 34 parts.
It measures 90 × 60 mm and has 2 copper layers, 1.6 mm thick.
34 parts, built around the CN3791, USB-TYPE-C-019, WJ25C-B-7.62-02P-13-00A and SWPA4030S100MT. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the Vaaxs/solarCharger repository on GitHub, at the commit this page was made from: the board is Solar charger 3.kicad_pcb and its schematic Solar charger 3.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask Vaaxs before reusing the design.

Hidayatur-rahman/Solar-Water-Level-Monitor-ESP8266-ESPHome-
A solar-powered water tank level monitoring system built around the ESP8266 (ESP-12E), designed in KiCad and running on ESPHome

maxlab-io/tokay-lite-pcb
Tokay AI Camera - ESP32 camera development board


punkfab/pcb-corpus
235 real KiCad boards from open-source hardware repositories, prepared as a placement and routing benchmark

LarsDwars/HelixQueledPrint
An break out board and LED driver for RGBW LED's from the showtec helix s5000 or any queled Q4xx light


SolderedElectronics/MPPT-Li-Ion-CN3791-charger-board-hardware-design
Hardware design, BOM, gerbers and 3D files for MPPT-Li-Ion-CN3791-charger-board designed by Soldered Electronics.
