Building a solar-powered LED light requires just four core components: a small solar panel, a rechargeable battery, one or more LEDs, and a simple charge controller. The entire project can cost under $10 in parts and takes about an hour to assemble. Here’s how to size, wire, and weatherproof your own from scratch.
The Four Essential Components
Every solar LED light, from a cheap garden stake to a commercial floodlight, uses the same basic architecture. A photovoltaic panel converts sunlight into electricity. That electricity charges a rechargeable battery during the day. At night, a controller senses the darkness and routes battery power through an LED. That’s the whole system.
For a small DIY project like a path light or jar lantern, you need:
- A small solar panel (1W to 3W for most single-light projects)
- A rechargeable battery (a single 3.7V lithium cell or 1.2V NiMH AA/AAA cells)
- One or more LEDs (standard 5mm or higher-output SMD LEDs)
- A charge controller with light sensor (a TP4056 module for lithium batteries, or a dedicated solar garden light circuit board)
You’ll also need a current-limiting resistor for each LED string, hookup wire, solder, and a weatherproof enclosure or jar.
Choosing Your Battery
The two practical options for small solar lights are NiMH cells and lithium-ion cells, and the choice shapes the rest of your build.
NiMH batteries (standard rechargeable AA or AAA cells) are cheap, widely available, and tolerate cold weather better than lithium. A single NiMH AA provides 1.2V and typically 2,000mAh. The downside is that their voltage sags noticeably as they drain, which means your LED will dim through the night. They also have shorter cycle lives, so you’ll replace them more often.
Lithium-ion cells (like the common 18650) deliver 3.7V nominal with higher energy density, longer cycle life, and a flatter voltage curve, so brightness stays more consistent. The tradeoff is that lithium cells need proper charge protection. You cannot simply connect a solar panel directly to a lithium battery without risking overcharge, which creates a fire hazard. That’s where a charge controller comes in.
For most DIY builds, a single 18650 lithium cell paired with a TP4056 charge module is the simplest and most reliable path. These modules cost under a dollar, handle all the charging logic automatically, and include overcharge and deep-discharge protection. The TP4056 charges to a precise 4.2V, then cuts off. If the battery later drops below about 4.05V (roughly 80 to 90% capacity), it starts another charge cycle on its own.
Sizing the Panel and Battery for Your Runtime
The math is straightforward. Start with how much power your LEDs consume, then work backward to figure out how much battery and solar panel you need.
A typical white 5mm LED draws about 20mA at 3.2V. That’s roughly 0.064W. If you want a string of five LEDs running in parallel, total draw is about 100mA, or 0.32W. For 8 hours of nighttime runtime, you need:
100mA × 8 hours = 800mAh of usable battery capacity.
Lithium batteries should only be discharged to about 80% of their total capacity to preserve lifespan. So divide by 0.8: you need a battery rated at least 1,000mAh. A standard 18650 cell at 2,500 to 3,000mAh gives you generous headroom and can power this setup for two or even three cloudy days without a full recharge.
For the solar panel, you need to put back at least 800mAh during daylight hours while accounting for real-world losses. Even in good sun, small panels lose efficiency to angle, clouds, and heat. A safe rule is to size your panel to deliver roughly 1.5 to 2 times your nightly consumption. A 1W panel producing around 250 to 300mA in direct sun will fully recharge this setup in 4 to 5 hours of good sunlight.
Calculating the Current-Limiting Resistor
LEDs will burn out instantly if you connect them to a battery without limiting the current. You need a resistor in series with each LED (or each series string of LEDs). The formula is simple:
Resistor (ohms) = (Supply Voltage − LED Forward Voltage) ÷ LED Current
LED forward voltage varies by color. Red LEDs typically need about 1.8V, green around 2.2V, and white or blue LEDs need 3.0 to 3.6V. Most standard LEDs run well at 15 to 20mA.
For a single white LED (3.2V forward voltage) running at 20mA from a fully charged 18650 (4.2V maximum):
(4.2 − 3.2) ÷ 0.020 = 50 ohms
The nearest standard resistor value is 47 or 56 ohms. Choosing 56 ohms runs the LED slightly under 20mA, which is perfectly fine and extends its life. If you’re running a red LED from the same battery, you’d need (4.2 − 1.8) ÷ 0.020 = 120 ohms.
Wiring the Circuit
The complete circuit connects in this order:
Solar panel positive and negative wires go to the input pads of the TP4056 module (marked IN+ and IN−). The battery connects to the module’s output pads (BAT+ and BAT−). The TP4056 handles charging automatically, including shutting off when the battery is full and restarting if the voltage drops.
For the light circuit, you need a way to turn the LEDs on when it gets dark. The simplest approach is a small photoresistor (light-dependent resistor) paired with a transistor. When light hits the photoresistor, its resistance drops and keeps the transistor off. In darkness, resistance climbs, the transistor switches on, and current flows from the battery through your resistor and LED to ground. Pre-made solar light controller boards that include this sensor logic are available for under $2 and save significant wiring.
If you’re wiring multiple LEDs, you have two options. Parallel wiring puts each LED (with its own resistor) across the same battery voltage. This is simpler and means one dead LED won’t kill the rest. Series wiring stacks LED voltages, which is more efficient but requires your supply voltage to exceed the total forward voltage of all LEDs in the chain. For a 3.7V lithium cell, you can realistically run only one white LED in series since two would need over 6V. Parallel is the practical choice for most small builds.
Weatherproofing for Outdoor Use
Electronics and rain don’t mix, and outdoor solar lights face months of exposure to moisture, temperature swings, and condensation. The enclosure is just as important as the circuit.
The simplest approach for a DIY build is a mason jar or clear plastic container with a screw-on lid. Mount the solar panel on top of the lid facing upward, run the wires through a small drilled hole, and seal the hole with RTV (room temperature vulcanizing) silicone. RTV silicone outperforms regular silicone caulk for electronics because it creates a more durable moisture barrier and lasts longer in outdoor conditions.
If you’re using a plastic or metal project box, seal the lid with a rubber gasket or a bead of RTV silicone around the rim. Any hole where wires pass through should get the same treatment. For cable entry points, waterproof cable glands (a few cents each) thread into a drilled hole and compress a rubber seal around the wire. These are rated by IP (Ingress Protection) standards, and an IP65-rated gland keeps out rain and splashing water.
Keep the battery and charge controller inside the sealed enclosure. The solar panel itself is designed to be exposed, but make sure its wiring connections are sealed where they enter the housing. A small packet of silica gel desiccant inside the enclosure helps absorb any trapped moisture that could cause condensation on cool nights.
Putting It All Together
For a practical single-LED jar light, here’s a complete parts list: one 5V/1W mini solar panel, one TP4056 charge module with protection, one 18650 lithium cell and holder, one white 5mm LED, one 56-ohm resistor, one solar light controller board (or a photoresistor and NPN transistor), hookup wire, solder, a mason jar, and RTV silicone sealant.
Solder the solar panel leads to the TP4056 input. Solder the battery holder to the TP4056 battery pads. Connect the controller board’s input to the battery’s positive and negative terminals, then wire the LED and resistor in series from the controller board’s output. Test the circuit indoors by covering the light sensor with your thumb. The LED should turn on. Uncover the sensor and it should turn off.
Once everything works, mount the solar panel on the jar lid with a dab of silicone adhesive, pass the wires through the lid, and seal the hole. Place the battery, charge module, and controller board inside the jar. Hang the LED where you want it, either inside the jar for a lantern effect or wired through the lid to face outward as a path light. Set the jar in direct sunlight for a full day before the first use to give the battery a complete initial charge.
This basic design scales easily. For brighter output, swap the single 5mm LED for a 1W high-power LED module (which draws around 300mA and needs a larger solar panel and battery to match). For a string of decorative lights, wire multiple LEDs in parallel with individual resistors and increase your battery and panel capacity proportionally.

