Dollar Store Garden Lights As ATtiny Power Supplies

Solar garden lights are just another part of the great trash pile of our age, electronics so cheap as to be disposable. Most of you probably have a set lurking somewhere at home, their batteries maybe exhausted. Internally though they are surprisingly interesting devices. A solar cell, a little boost converter chip, and a little NiCd battery alongside the LED. These are components with potential, as [Randy Elwin] noted with a mind to his ATtiny85 projects.

The YX805A chip he references in his write-up is one of several similar chips that function in effect as joule thieves, extending the available charge in the battery to keep the LED active as long as possible when their solar panel is generating nothing, and turning it off in daylight when the panel can charge. Their problem is that they are designed as joule thieves rather than regulators, so using them as a microcontroller PSU without modification can result in overvoltage.

His solution is to use the device’s solar panel input as a feedback pin from his ATtiny, allowing the microcontroller to keep an eye on its supply voltage and enable or disable the converter as necessary while it keeps running from the reservoir capacitor. Meanwhile the solar panel now charges the NiCd cell through a single diode. It’s not perfect and maybe needs a clamp or something, he notes that there is a condition in which the supply can peak at 8 volts, a level which would kill an ATtiny. But still, we like simple hacks on dollar store parts, so it’s definitely worth further investigation.

This isn’t the first garden light hack we’ve shown you, there was this flashlight, and some LED hacks.

Solar light picture: Leon Brooks [Public domain].

19 thoughts on “Dollar Store Garden Lights As ATtiny Power Supplies

  1. A word of advice – look for the ones using an AA or AAA cell. Many of the uber cheap ones use a 2/3 AA cell (literally 2/3 the length), which since they are so cheap, will not last long, and are near impossible to find replacements for. A solar pathway lamp using a standard battery size will be easier to fix with a standard uprated battery.

    An additional benefit to the ones using a standard battery size is that they tend to gave more space inside the cap. I found a dollar store source for ones that even have an on/off switch.

    You might also find it beneficial to apply some UV resistant tape across the top to better seal water from weeping.

    I have made several devices for use in the garden based on solar pathway lights and ATTiny13A uCs, though do not rely on the LED boost circuit, but rather my own. Schottky diode between the solar positive and the battery. Direct connection between the battery and the boost circuit. No problem having a well written program run one or more days off of the charge from a single day of sunlight – longer runtimes when you are not consuming as much power.

    1. 2/3 AAs can be most commonly found in cordless phone packs of 3. Look for them in liquidation stores, where they’ll get cheap enough to be worth the bother of busting the packs up.

      1. Cordless phones, even if at liquidation, still seems more pricey than decent commodity NiMH cells with many times the capacity that you needn’t hunt around looking for a cheap source for.

        The solar lamps using single 2/3AA cells (not to be confused with the 12V “A23” battery often used in automotive RF remotes) generally suffer from lack of space inside the cap, while the ones with an AAA or AA cell are a larger diameter housing and afford much more interior space for your project.

        Plus, right off the bat(tery), the AA and AAA cells in the cheap pathway lights tend to be rated at a higher capacity, simply by merit of having more mass, even if you’re not replacing it with an uprated one.

        Another benefit of a common battery format: if for some reason the solar cell gives it up (they can), you could disconnect the solar cell and stuff a pre-charged rechargeable cell in, or even an alkaline. If you have a source for an AA or AAA device, it’s simply going to be easier to continue using it, whereas the 2/3AA cell is going to be an extra hassle to deal with.

        I have an ATTiny43U based device that’s been running continuously for 14 months now that’s only dropped a _single_ AA alkaline cell by about 100mV in that time (and the cell wasn’t fresh when I started), though admittedly, this isn’t stuffed into a pathway light housing – it could in fact be fit into one.

        I’m speaking from experience – the 2/3AA stakes I’ve used were universally underwhelming in battery capacity.

    1. Clamping the voltage of a solar panel down isn’t a good idea, because you make it operate way away from the maximum power point and lose most of the efficiency.

      These cells have a peak voltage around 7-12 Volts and the optimum point around 6-7 Volts, so the solar lantern itself is just using it as a current source regardless of efficiency. You can run so much more stuff on of these if instead of running the current to a single NiCD cell, you run the current to a capacitor first, allow it to charge up to 6-7 Volts and run a switching regulator to drop the voltage to a useful level.

      In fact, if you just add more batteries, like 6 NiMH cells in series, you get a voltage range of 5.4 – 8.4 Volts which is probably going to be bang on around the maximum power point of the cell. With these small panels you can collect around 3 Watts of power for maximum and around 200-300 mW on average, so that’ll run you some serious stuff – not just tiny microchips.

      Here’s how the cell behaves: if you fit the maximum voltage (minus one diode) to just slightly over your battery’s standby voltage, it becomes automatically regulating because the cell can’t generate enough voltage to overcharge the battery. For NiMH/NiCD this isn’t critical anyhow, so you can go a bit over to make sure the battery gets charged full at least sometimes. (balances the cells)

      1. The charging voltage has to be higher than the cell voltage to push any current in. You also want to take advantage for the full day light hours for charging instead of just the few hours around the peak at noon (and account for seasonal changes). So for passive charging without a boost circuit, you’ll want to reduce the number of cells.

      2. Some solar pathway lights (the larger and more expensive sort) may have multiple battery packs and a larger solar cell – at which point they no longer need a boost circuit to run the LED. The type pictured in the linked project (versus the HaD anchor) are in fact single battery types, with a small solar cell that outputs circa 2V in full sun.

        If you have a dollar store source for 3W solar pathway lights that output 5V+ under load, I’d like to hear about it.

    2. Looking at the circuit diagrams, these converter chips only have a zener diode inside the chip to waste most of the voltage from the solar panel and prevent the single NiCD cell from overcharging. The zener in the chip also works as the blocking diode to prevent discharging the battery through the solar cell when it’s dark. After that, it’s just a simple boost converter running from the battery to the LEDs.

      So, if you wanted 3.3 Volts, you should actually just toss the converter chip away and put a small blocking diode in series with the cell, then the zener clamp, then a large storage capacitor or a suitable battery.

      That’s it. No point in trying to put legs on a snake.

  2. “…electronics so cheap as to be disposable…” right there you have the problem of modern society, people just dumping stuff as it would be absorbed by nature, and even if it did, the energy used for transforming the raw materials into the devices would have been wasted.
    Do you even know how much electronics are actually recycled properly (even when thrown into the recycling bin?

    1. I thought that Ni-Cad’s were done, history, globally for everything but medical and avionics legacy uses. Whatever industrial waste form China is processed and packed into these cells is anybody’s guess. I watch in the neighborhood as a new set of these landing lights for bugs fail one by one starting right-away and eventually they are getting mowed, kicked about, crushed, and leaking that toxic stuff in the yard. Once it gets to the street, it is effectively in the One Ocean.

  3. Great work. Dollar Tree garden lights are, indeed, a lure that demands repurposing. Their Achilles heel is the nicad battery. There is no overcharge protection and adding that just creates more drain on a minimal current supply. Nonetheless they are a joy to fiddle with.

    1. With these small solar cells, overcharging is not really an issue. I have been using self made solar lights with a 5252F chip as converter for years. I use old 2000 mAh NiMH cells with them. No issues even after more than 3 years.

  4. I’ve searched and cannot find garden lights that limit their operating time to say 4 hours per night. In this way there is enough left in the battery to power through a couple more nights despite overcast days. Evidently, this doesn’t have a business case with the garden light manufacturers. Another beneficial function for an ATtine85 project.

    The closest I witnessed to this 4 hour timer was in battery operated XMAS string lights at the dollar store. A chip made for an inexpensive timer. Turn the light on, and it operates for 4 hours… then turns off… and on again the next day at the same time. Alas, this feature existed at the Dollar Store product for only a couple years. The latest versions use the same battery housing, but no more PCB blob chip. Just an on/off switch. Economized!

    So it would seem that these garden lights truly can’t get out of the bottom of the barrel, lowest cost rut… requiring Hack-a-Day material improvements.

  5. Is it possible to connect two Dollar Store solar cells in series to power a 1.5 v motor. I’m a teacher looking for cheap solar cells for my students and already have a bunch of the hobby motors. Trying to keep it super simple for my elementary kids. Thank you!

    1. The small cells don’t have a lot of current – they charge a small battery over the course of several hours. They are unlikely to be able to run much of a motor at all directly.

      You may want to google “solar engine capacitor” to find references to circuits where the solar cell charges a capacitor, which once it is above a threshold voltage can power a motor in pulses. charge – spin – peter out – charge – spin – peter out … it requires a few parts more than just a solar cell and a motor, but it is doable.

      Also, if you’re after just the solar cells, you might try Ali Express (or some of the other Chinese marketplace sites), where you can buy just the solar cells, and get single ones with higher voltage output:

      if you’re looking at them for just the solar cell, that seems cheaper, than a like number of dollar store units *AND* you’re getting the higher voltage (so more like 2x the stake light count, and without the series wiring hassle or dealing with the enclosures that get in the way)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.