Every solar garden light is the same four parts: a panel, one rechargeable cell, a boost driver chip, and an LED. What separates a light that runs to sunrise in December from one that quits at 9 p.m. is not the parts list. It is whether anyone did the arithmetic first.
So start there. Two builds follow: a minimal one that is functionally identical to a commercial stake light, and a better one that fixes the four things cheap lights get wrong.
The one equation nobody publishes
A single NiMH cell sits at 1.2 V. A white LED needs roughly 3.1 V to conduct. The driver is a boost converter, so it pulls about three times as much current out of the cell as it pushes through the LED:
Battery current = LED current × LED forward voltage ÷ (efficiency × cell voltage)
20 mA LED × 3.1 V ÷ (0.83 × 1.2 V) = 62 mA drawn from the cell
The 0.83 is the QX5252F’s rated efficiency, straight off the manufacturer’s data sheet. That 3× multiplier is what turns a “20 mA LED” into a 62 mA load, and it is why so many builds need 875 mAh a night while sitting on a 600 mAh AAA.
How much darkness, and how much sun
The other half of the budget is hours. The peak sun hours below are plane-of-array irradiation from the European Commission’s PVGIS model, which covers the US, for a panel lying flat and for the same panel aimed south at the local latitude.
| Location | Dec darkness | Dec peak sun hours, flat | Dec peak sun hours, tilted south | Jun darkness | Jun peak sun hours, flat |
|---|---|---|---|---|---|
| Garden Grove, CA (33.8°N) | 14.1 h | 2.81 | 4.80 (34°) | 9.6 h | 7.84 |
| Chicago, IL (41.9°N) | 14.9 h | 1.53 | 2.86 (42°) | 8.8 h | 6.64 |
| Seattle, WA (47.6°N) | 15.6 h | 0.82 | 1.87 (48°) | 8.0 h | 5.49 |
Read the Garden Grove row twice. Tilting the panel instead of laying it flat on a cap adds 71% to the worst month of the year, and in Chicago it adds 87%. No component swap comes close to that. It is also the one improvement no off-the-shelf stake light offers, because the panel is molded into the lid. Our guide to the optimum solar panel angle has the tilt numbers for other latitudes.
The inductor sets the brightness
The QX5252F and the YX8018 have no current-setting resistor. A single external inductor decides how much current the chip pulls per switching cycle, and therefore how bright the light is and how fast the cell empties. Change nothing else, swap the inductor, and you have a different light. Here the published sources disagree badly, and it is worth knowing that before you order parts.
| Inductor | QX5252 data sheet, mA at 1.3 V | Bench measurement, QX5252F | YX8018 data sheet, LED current at 1.25 V |
|---|---|---|---|
| 560 µH | — | — | 3.0 mA |
| 330 µH | 11 | — | — |
| 220 µH | 15.5 | 13 | 7.0 mA |
| 150 µH | 25 | — | 10 mA |
| 100 µH | 34.5 | 30 | — |
| 82 µH | 38 | — | 15 mA |
| 47 µH | 75 | — | 30 mA (2 LEDs) |
| 33 µH | 110 | 80 | — |
The QX5252 column is battery-side current, not LED current. You can prove it with the boost equation: 15.5 mA from a 1.3 V cell at 83% efficiency delivers about 5 mA to a 3.1 V LED, and Colin Mitchell’s bench measurement of 13 mA at 220 µH lands in the same place. The most-linked DIY page on this subject reads that same table as LED current and tells you 220 µH “works well for a standard LED of about 20 mA.” It does not. It gives you about 5 mA at the LED, and it empties the cell roughly three times faster than the reader expects.
A second QX5252F data sheet, from a European catalogue house, lists 5.3 mA input at 220 µH instead of 15.5 mA — about a third of both the original table and the bench measurement. I could not reconcile the two documents, and would not design around either without a meter in series with the cell. If you already own lights and only want more out of them, making solar garden lights brighter covers the same swap on a finished fixture.
Build one: the three-dollar stake light
This is exactly what is inside the light you can buy at the hardware store, and there is real value in building it once just to see how little is in there.
- Driver: QX5252F in TO-94, or a YX8018. Four pins: solar, battery, ground, LX.
- Inductor: 220 µH axial, 1 W type.
- Cell: one AA NiMH, 2000–2300 mAh. Never a AAA if an AA will fit.
- Panel: 2 V, 40 mA. Voltage matters more than wattage here; the chip’s absolute maximum on that pin is 5.5 V, so a 6 V panel is out.
- LED: one 5 mm white. Long leg is the anode.
- Blocking diode: none needed. The QX5252 carries a Schottky diode on the die and disconnects the panel itself.
Wiring is four joints: panel positive to pin 1, cell positive to pin 2, pin 3 to the common ground, and the inductor from pin 4 to the LED anode. LED cathode, cell negative and panel negative all go to that same ground. No switch, no photoresistor, no charge controller. The chip senses panel voltage and turns the LED on when the panel stops producing, which is also why a light stored in a garage comes on and flattens itself. If your build never lights, that sensing path is the first thing to check — see fixing a solar light sensor.
What it actually delivers
At 220 µH the cell gives up about 14 mA. In Garden Grove in December that is 14.1 hours × 14 mA = 197 mAh needed. The panel brings in 40 mA × 2.81 peak sun hours = 112 mAh gross, and after a 30% haircut for dirt, panel aging, partial shade and NiMH charge acceptance, call it 79 mAh. The light runs 5.6 hours and dies around 11 p.m. In Chicago it manages about three.
In June the same light needs 134 mAh and harvests around 220, so it runs all night with room to spare. That seasonal collapse is not a fault; it is the design behaving as specified. The 30% haircut is not fixed either, and cleaning the panel on garden lights claws back more of it in ten minutes than any part swap will.
Build two: the one worth building
Four changes. Each fixes a specific failure of the cheap version.
Put the panel on a lead so you can aim it
A 3-foot cable between panel and body lets you tilt the panel to your latitude, point it south, and put it in sun while the fixture sits in shade. From the table above, that is worth 71–87% more energy in December. Use two-conductor 22–26 AWG silicone-jacketed wire; it survives UV and repeated flexing far better than PVC.
Size the panel from the cell, not from the brightness you want
There is no charge termination in this circuit. On a clear June afternoon the panel pushes current into a cell that is already full, all day, every day. Energizer’s NiMH handbook puts the ceiling for continuous maintenance charging at less than 0.025C, or C/40. For a 2300 mAh AA that is 57 mA. So:
- 2 V / 50 mA panel with a 2300 mAh AA works out to C/46. Within spec.
- 2 V / 160 mA panel with a 600 mAh AAA is C/3.75. That cell is being cooked every sunny afternoon and will be dead inside a season.
The second line is the real reason cheap lights need new batteries so often, and it is worth reading next to whether a higher-mAh battery helps in solar lights. It does, but largely by lowering the charge rate rather than by storing more.
Run the budget again with a 50 mA aimed panel and a 330 µH inductor, which draws 11 mA and puts about 3.5 mA through the LED. Garden Grove in December needs 155 mAh and harvests 180. It runs to sunrise in the worst month of the year. Chicago at the same spec falls short at 107 mAh and wants an 80 mA panel, which in turn needs 3200 mAh of cell to stay under C/40, so two AAs in parallel.
Use a standard cell in a holder
Solder tabs and a glued-in cell turn a ten-year fixture into a two-year one. A sprung AA holder costs a quarter and makes the only consumable part replaceable with a thumbnail. That is the biggest single difference between a light you build and a light you buy.
Gasket it, but do not seal it airtight
Water is what kills these things, not electronics. An O-ring or silicone bead under the lid, a drip loop where the wire enters, and epoxy around the edge of the panel glass will outlast every other decision you make. How long solar lights last is mostly a question about gaskets; yellowed plastic is the other half, so pick a UV-stabilized grade for anything facing the sky.
But do not pot the battery compartment. Both Energizer handbooks carry the same warning: “For devices with tightly sealed or water proof battery compartments, hydrogen gas generation under normal or abusive conditions needs to be addressed as a potential safety issue.” A NiMH cell under sustained overcharge vents, and a fully potted cavity gives that gas nowhere to go. Pot the board if you like. Gasket the cell and leave it able to breathe.
When you do need a blocking diode
If you wire a panel straight to a cell with no driver chip in the charge path, put a diode in series with the panel positive. After dark an unlit panel becomes a forward-biased load and quietly drains the cell back through itself.
Use a Schottky, not a general-purpose rectifier. A 1N5817 is specified at 0.45 V forward at 1 A; a 1N4001 sits near 0.7 V. On a 2 V panel charging a 1.2 V cell you have only about 0.8 V of headroom to start with, and spending a third of it on the wrong diode is how a panel that should top the cell up by mid-afternoon never quite finishes.
Three ways to get this wrong
A primary cell. Never put an alkaline AA in a solar light. Energizer’s alkaline handbook is blunt: “Charging of primary batteries may cause explosion or leakage which may result in bodily injury.” The driver’s over-discharge cutoff is set for a 1.2 V chemistry and cannot protect a 1.5 V cell in any case.
An inductor that is too small. Drop from 220 µH to 33 µH and the chip pulls 80–110 mA instead of 13. The light is brilliant for two hours, the cell is flat by 10 p.m., and you are deep-cycling a NiMH every night, which is the fastest way to ruin one. Too large an inductor is the gentler failure: the light is simply dim, and below roughly 3 mA it may not start reliably on a partly charged cell.
Charging in the cold. Both NiMH data sheets specify a charge temperature range of 0–40 °C, or 32–104 °F. A light charging on a 25 °F January morning is out of spec; a black cap baking at 120 °F in July has poor charge acceptance for the opposite reason. A light-colored housing is not cosmetic.
Is it worth building?
For most people, no, and the arithmetic says so plainly. A 20 mA LED pulls 62 mA from the cell, or 874 mAh across 14.1 December hours. Staying under 50% depth of discharge means a 2300 mAh AA at minimum, and replacing 874 mAh from 4.8 tilted peak sun hours needs a 243 mA panel — which then needs 9700 mAh of cell to stay under C/40. That is four AAs or a pair of D cells, a panel the size of a paperback, and a housing stout enough to hold it. A sealed $15 light beats that on cost and on weatherproofing, and it arrives working.
The honest reasons to build are narrower and better than “to save money”:
- Learning. An afternoon with a QX5252F, a multimeter and three inductors teaches more about energy budgets than any amount of reading.
- A form factor that does not exist. A light inside one specific piece of glass, a fence cap in an odd size, a marker for one awkward step. If what you want is a look rather than a shape, the category has usually solved it already — the flame effect in solar tiki torch lights, for example, is hard to beat with discrete parts.
- Repairability. A fixture with a holder, a gasket and a panel on a lead can be maintained for a decade. Very little sold at this price point can.
Before committing, measure the panel you already have: how to test solar panels covers the short-circuit current reading every number above depends on. And if the sensible answer turns out to be buying, our solar pathway lights ship sealed and warranted, which is two things a breadboard in a jam jar will never be.
Sources
- QXMD - QX5252 LED driver data sheet voron.ua The inductance-versus-current table from 330 microhenries at 11 mA through 33 at 110 mA, the integrated Schottky diode, the 0.9-1.5 V operating range, and the light-control switching thresholds
- Conrad Electronic / TRU Components - QX5252F TO-94 data sheet asset.conrad.com The 83% working efficiency used in the boost equation, the 0.9 V over-discharge cutoff, and the conflicting 5.3 mA figure at 220 microhenries that this article refuses to reconcile silently
- YX8018 solar LED driver data sheet micro-planet.ma The alternative driver's LED-current-versus-inductor table at 1.25 V, which is a different quantity from the QX5252 table and is the trap the top-ranking DIY page falls into
- Colin Mitchell, Talking Electronics - Projects Under $10 talkingelectronics.com An independent bench measurement of QX5252F supply current - 13 mA at 220 microhenries, 30 at 100, 80 at 33 - which breaks the tie between the two conflicting data sheets
- Energizer - Nickel Metal Hydride Handbook and Application Manual data.energizer.com That a maintenance or trickle charge should stay under 0.025C (C/40), which is what sizes the panel against the cell, plus the sealed-compartment hydrogen warning behind the advice not to pot the battery
- Energizer - Alkaline Manganese Dioxide Handbook and Application Manual data.energizer.com That charging primary batteries may cause explosion or leakage resulting in bodily injury, and the same hydrogen warning for sealed compartments
- Energizer NH15-2300 (HR6) AA data sheet data.energizer.com 1.2 V nominal at 2300 mAh measured at 0.2C, and the 0-40C (32-104F) charging window that a light charging on a January morning falls outside
- European Commission JRC - PVGIS re.jrc.ec.europa.eu Every peak sun hour figure in the darkness-and-sun table, flat and tilted, for Garden Grove, Chicago and Seattle, queried directly rather than read off a map
- Diodes Incorporated - 1N5817 to 1N5819 data sheet diodes.com A 1N5817 forward voltage of 0.450 V at 1.0 A against roughly 0.7 V for a silicon rectifier, which is a third of the usable headroom on a 2 V panel
Questions people ask
How do you make a DIY solar light using mason jars?
A mason jar is the housing, not the circuit. Inside you still need the same four parts: a 2 V panel, one AA NiMH cell, a QX5252F or YX8018 driver, and an LED. Mount the panel on a disc of acrylic cut to fit the lid, drill one small hole for the wires, and seal both with clear silicone. The jar's weak point is the lid seam - glass jars are not weatherproof until you gasket that joint, and standing water inside will kill the cell within a season.
How can I make my own solar garden lights brighter than store-bought ones?
Not easily, and the arithmetic explains why. Brightness is set by the inductor, and a genuinely bright 20 mA LED pulls about 62 mA from the cell - roughly 874 mAh over a December night. Supplying that needs a 243 mA panel and, because the circuit has no charge termination, close to 9,700 mAh of cell to keep charging under C/40. That is two D cells and a panel the size of a paperback. Cheap lights are dim because the architecture caps panel current at a fraction of a tiny battery.
Can you power solar lights without the sun?
Yes, but badly. Any light source will charge the panel; what matters is how much of it lands in the wavelengths the cell converts. An LED desk lamp an inch from the panel produces a small fraction of the current full sun does, so a full charge takes days rather than hours. It works for testing a build on the bench. It is not a substitute for putting the panel outside, and it will not keep a light running through a week of overcast.
Do Dollar Tree solar lights work?
They work exactly as designed, which is the problem. Inside is the same QX5252F or YX8018 circuit as a $15 light, usually with a 600 mAh AAA, a 40-60 mA panel and no gasket. The cell is typically charging at C/10 or worse with no termination, so it dies within a season, and the housing lets water in. They are a fine source of donor chips, inductors and panels for a build of your own.
What inductor should I use in a QX5252F solar light?
220 microhenries is the sensible default: about 13-15 mA out of the cell, roughly 5 mA at the LED, and it will run a single white LED through most of a summer night on one AA. Go to 330 if you want all-night operation in winter and can accept a dimmer light. Go below 100 only if you have sized the panel and cell for it, because a 33 microhenry inductor pulls 80-110 mA and will flatten an AA before midnight.
Do I need a blocking diode in a DIY solar light?
Only if the panel connects to the cell without a driver chip in between. The QX5252 and YX8018 both integrate a Schottky diode and disconnect the panel themselves, so a standard build needs nothing extra. If you are wiring a panel directly to a battery - a repair, a bigger panel, a multi-cell pack - use a Schottky such as a 1N5817 rather than a 1N4001. On a 2 V panel the extra 0.25 V that a silicon rectifier drops is a third of your usable headroom.
What battery should a homemade solar light use?
A single NiMH AA, 2000-2300 mAh, in a replaceable holder. Never an alkaline or any other primary cell - Energizer's own handbook warns that charging a primary battery may cause explosion or leakage. NiMH also needs no break-in or conditioning ritual, despite what you will read; no manufacturer document from Energizer, Panasonic, Duracell, GP, FDK or VARTA describes one. Put a new cell in, seal the light, and leave it alone.
