# YX8018 solar led light - adaptable to li-ion?

#### Grum

Joined Apr 30, 2018
41
Hi all - I have a row of these cheap solar garden led light alongside a path that is mostly in the shade, so the batteries very seldom charge sufficiently to give more than about 30 minutes of light at dusk, and are completely exhausted by the time it really gets dark and we could actually benefit from them!
I am thinking about attempting to wire them all to a common 1S3P 18650 li-lion power pack in my shed, which would in turn be charged from a much better placed solar panel via a ‘proper’ charge controller.
So I am guessing the easy part is simply removing the batteries from the lights, and wiring them to the li-ion pack instead. My question is whether I should be leaving the remainder of the circuit as is, but regulating the input voltage down to 1.5v at each light, or can the YX8018 operate from a 3-4.2v supply without releasing the magic smoke, and if so, should I replace the inductor (between Vcc and LX pins) with a current limiting resistor instead?
Any thoughts, or alternative solutions with the emphasis on cheap (I.e. as close to free as is practical), and minimally invasive. Given that the lights were only $2 each, spending$\$ on a solution kind of defeats the object of the exercise really.
TIA
Grum

#### MisterBill2

Joined Jan 23, 2018
11,900
The simple work-around will be to put two of the garden lights in series so that the required voltage is twice as much. Then it will be pairs pf the lights, a bit more complex in wiring but not requiring any extra regulation. It may also be that the lights can keep their internal batteries and simply those batteries be charged in series from the higher voltage solar panel. It will require more complex wiring but no extra electronics, although still a charge controller from the solar cell array.

#### Alec_t

Joined Sep 17, 2013
12,817
The simple work-around will be to put two of the garden lights in series
I doubt it would be that simple. Those garden lights typically have an internal blob which both detects the light/dark threshold and controls a boost converter for raising the cell voltage to ~3V for the LED. Or did you mean connect directly to the LEDs and cut out the detector/converter?

#### Grum

Joined Apr 30, 2018
41
Those garden lights typically have an internal blob…
No blob in this case Alec_t, it is wired exactly as per the (corrected) example diagram in the data sheet - see attached. So, maybe it is as ‘simple’ as stringing two together - not that I pretend to quite understand how that could work…

#### Alec_t

Joined Sep 17, 2013
12,817
No blob in this case Alec_t
That YX chip is the 'blob' I was referring to. Some lamps have a circuit-on-board blob instead of a pinned rectangular chip.

#### Grum

Joined Apr 30, 2018
41
The simple work-around will be to put two of the garden lights in series…
LOL - MisterBill2, you credit me with a lot more than I have in the knowledge area…. I’ve attached a circuit diagram that shows one lamp… can you explain how connecting two of them in series might look? Connecting them in parallel I can visualise, but in series has got me stumped.

#### Grum

Joined Apr 30, 2018
41
That YX chip is the 'blob' I was referring to. Some lamps have a circuit-on-board blob instead of a pinned rectangular chip.
Aha - now I understand… I guess that just because it has a device number on it, unless you can actually get a schematic of the device operation, then it might just as well be an anonymous blob…

#### MisterBill2

Joined Jan 23, 2018
11,900
OK, I should have been much more specific. I meant to put the battery connections in series, possibly even with the original battery still in place. An external power source will then not only be stabilized by the internal battery, it will also charge that battery. So adding external power by that means can be safe and effective, in addition to costing much less.
To answer the question in post #6, about the series connection, first visualize a second copy of the circuit shown.
Then, from the positive terminal of the solar cell package, a wire to the positive terminal of the first circuit, leaving all internal connections unchanged. Next, another wire connected to the negative terminal of that battery in the first circuit to the positive terminal of the battery in the second circuit. Finally, a wire from the negative terminal of the battery in the second circuit to the negative terminal of the solar cell package. This is a series connection. The voltage from the solar cell array will be divided between the two batteries, hopefully fairly equally.
If it happens that the rated output of the array is six volts, then there will need to be four light devices in the series string instead of two.

Last edited:

#### Ya’akov

Joined Jan 27, 2019
5,666
No blob in this case Alec_t, it is wired exactly as per the (corrected) example diagram in the data sheet - see attached. So, maybe it is as ‘simple’ as stringing two together - not that I pretend to quite understand how that could work…
View attachment 267378
The way that IC works is to use the solar cell both to charge the battery and sense darkness. The output of the solar cell is on the CE (Chip Enable) pin which must be pulled low to turn on the chip. As long as there is enough light to keep the pin at logical high, the solar cell is connected to ground and has a path to charge the battery.

Once it gets dark enough for the voltage from the solar cell to be low, the IC disconnects the solar cell from ground and the battery starts to discharge into the VDD pin. The inductor is the only external part of a simple boost converter than brings the 1.2V from the NiMH battery up to the ~3V the LED needs.

You could probably just insert a diode into the input from the larger battery so the solar cell wouldn’t try to charge the LiIon battery. But you also need to replicate the action of not discharging the LiIon battery into the lights until it is dark.

#### Ya’akov

Joined Jan 27, 2019
5,666
Alternatively, you could just bypass the IC altogether and supply 3V centrally using a buck converter. You would just replicate the charge until dark, power until light part of the circuit back at the main supply and the buck converter would turn on a 3V feed to the LEDs when it became dark, and off while the sun charged the battery.

You would just need a current limiting resistor for each LED and feed them directly through that.

#### Grum

Joined Apr 30, 2018
41
... I meant to put the battery connections in series …
Ok - so you mean to basically wire the whole lamp circuit in series with the next one..? 8-o
That’s actually considerably simpler than I imagined. If I am understanding correctly, you mean something like this?
You really think that would work? I think I would remove the little Nicads altogether, and put a diode in each one so as to make the charge part of each lamp redundant, but leave everything else to run as normal at night, using a proportion of the Li-ion cell’s voltage.

#### Grum

Joined Apr 30, 2018
41
Alternatively…
Many thanks for your previous explanation Ya’akov, and this alternative solution. I must confess, I like this idea and had thought of something similar myself, but at the moment, I have no way to use the solar panel for charging the 18650, to also act as a signal for the daytime charging to switch over to night time loading (and it would also make the entire innards of the lamp redundant, except for the LED itself, and I hate to see waste). I do have a 12v time clock switch that I was wondering if I could utilise somehow, but 12v… that’s a whole new different kettle of fish! LOL

#### Ya’akov

Joined Jan 27, 2019
5,666
Many thanks for your previous explanation Ya’akov, and this alternative solution. I must confess, I like this idea and had thought of something similar myself, but at the moment, I have no way to use the solar panel for charging the 18650, to also act as a signal for the daytime charging to switch over to night time loading (and it would also make the entire innards of the lamp redundant, except for the LED itself, and I hate to see waste). I do have a 12v time clock switch that I was wondering if I could utilise somehow, but 12v… that’s a whole new different kettle of fish! LOL
You don’t need to use the solar panel, you can use a photosensitive switch of various kinds.The simplest ones require only a few components. Or you could make a high impedance connection to the solar cell output and switch with that. I am sure many members here would enjoy working out possible circuits.

#### MisterBill2

Joined Jan 23, 2018
11,900
Ok - so you mean to basically wire the whole lamp circuit in series with the next one..? 8-o
That’s actually considerably simpler than I imagined. If I am understanding correctly, you mean something like this?
View attachment 267383You really think that would work? I think I would remove the little Nicads altogether, and put a diode in each one so as to make the charge part of each lamp redundant, but leave everything else to run as normal at night, using a proportion of the Li-ion cell’s voltage.
That is indeed exactly what I meant, except that the added diodes provide no benefit. One diode in the string will prevent any chaarge from running back thru the solar cell array, while if it has any external circuit to deliver a battery charging current it will all ready have a reverse current prevention arrangement.

#### Grum

Joined Apr 30, 2018
41
That is indeed exactly what I meant, except…
Thanks MisterBill2. Point taken about the diodes. I guess I’ll grab a couple of the lights and test this theory out on my workbench. At just a couple of bucks, I can always grab a couple from Bunnings for the test…

#### MisterBill2

Joined Jan 23, 2018
11,900
The big part will be keeping the polarity correct. The individual battery at each position will tend to hold the voltage constant, and the external power will supplement the internal power so that they should stay lit longer. And if you have a storage battery in addition to the solar array the lights may stay on all night.

#### Grum

Joined Apr 30, 2018
41
…the lights may stay on all night.
LOL - I just checked and found that each light draws less than 10mA, so even a single 18650 with a marginal efficiency that can store 2000mAh could presumably power all 6 of my lights (3 pairs in parallel) all night for 3 nights without ANY recharging.

#### MisterBill2

Joined Jan 23, 2018
11,900
LOL - I just checked and found that each light draws less than 10mA, so even a single 18650 with a marginal efficiency that can store 2000mAh could presumably power all 6 of my lights (3 pairs in parallel) all night for 3 nights without ANY recharging.
OK, that is educational indeed. While the numbers say that it could do that, those numbers are based on the cell actually having the ability to deliver that much energy and having been fully charged. Rechargable batteries do lose capacity with cycling and depending on both the depth of discharge and the recharging cycle.

#### Grum

Joined Apr 30, 2018
41
OK - I bought a couple of new lights this morning - same manufacturer, but a slightly different model, and of course, it uses a different flamin’ chip
This new chip is a YX8050, which appears to be just another version of the same thing, but with the boost circuit running at a different frequency. So I’ve connected the two new lights in series to a freshly charged 18650 (4.15v) without their internal batteries, and without any diodes (not connected to solar charging yet anyway), and I can confirm that the concept works as predicted by MisterBill2.
I initially observed that the first lamp in the string was brighter than the second, but swapping the two units around brought the dimness to the front of the line, so I conclude that this is simply due to quality or accuracy variations in the individual components of the two lamps. One of them is simply dimmer than the other.
The individual lamps all have on/off switches, and these will obviously all need to be in the ON position, as any one of them being off will break the circuit for all the lamps in that loop.
The individual solar panels no longer act as switches for their own lamp, but appear to work in tandem, in a similar fashion to the on/off switches - if both are in the dark, the lights come on. If light then falls on one solar panel, both lights stay on, but if light affects BOTH panels, then both lights turn off. Going the opposite way, as soon as one panel senses darkness, then both lights come on.
One other observation - while my previous test on a single YX8018 based lamp drew just under 10mA from its 100mAh Nicad battery, testing BOTH of the new lamps in series (i note that these come with 200mAh Nicads), the pair are only drawing 6.5mA total from the 18650, while a single one is drawing about 12.5 from its Nicad… I guess that the increased voltage from the fully charged 18650 (2.1v per circuit) requires less current than the 1.2v from the Nicad, to achieve the same power output..? A quick check with calculator shows that 2.1v x 6.5mA is almost the same Wattage as 1.2v x 12.5mA.

BTW - while switching from two lamps in series, to a single lamp to check the current, I inadvertently left it connected to the 18650 with the perhaps unsurprising consequence of the lamp being incredibly bright, strangely drawing nearly 180mA, but most rewardingly, without the release of any magic smoke. So it could be possible to simply run all the lamps in parallel, if I reduce voltage and find the sweet spot maybe around that 2.1v area.
Phase II of experimentation commencing. If only I had a variable bench power supply :-(