Garden Light – Updated

NOTE: Some updates are at the end of the article.

Recently I purchased a couple of Solar powered LED garden path lights at the local Dollar Tree store for $1 each. Ever since I read TalkingElectronics.com‘s writeup on converting such garden lights into 5-volt solar power supplies, I have wanted to tinker with one. The one dollar light intrigued me because it was so amazing that one could be sold for that price. The one-dollar LED garden path light reduced the parts count and that is probably a big part of their ability to sell it so cheaply. I reverse engineered the circuit. It matches, quite closely, the example circuit for the Shiningic YX8018 specification sheet. My reverse engineered schematic is shown below: The Shiningic YX8018 specification sheet does not show the internal schematic of the YX8018 integrated circuit. However, the YX8018 contains an approximately 200 KHz gated oscillator that  drives an open drain NMOS switch to ultimately boost the battery’s 1.2 volts to, typically, three volts in order to power a three volt white LED – a sort of a joule thief. A joule thief is a minimalist Armstrong oscillator voltage booster. It would function similarly to the circuits shown by TalkingElectronics.com‘s writeup on the older type of garden lights that use discrete components. The YX8018 only runs the oscillator when it detects that the solar panel is in the dark. When the solar panel is producing power the YX8018 turns off  the oscillator and the battery is charged.

Analog Devices did a nice article on the YX8018 device. They drew The YX8018 internals based upon their analysis, which is shown below. Below the Analog Devices’s YX8018 illustration is one from Pete’s QBASIC website for the QX5252, another similar, if not identical IC. There are others, as well, that appear to be functionally equivalent if not, in some cases,  identical chips. For example, YX8019, JD1803, ANA608, ANA618, YX802, YX803, YX805, YX806, JD228, JD318 and F1-4S597.

yx8018-internals

All manufacturer datasheets refer to the 4-pin package as a TO-94 package, yet the only TO-94 JEDEC package that I can find is for the threaded bolt thyristor. To me, it is a 4-pin SIP package. I have no clue as to why the Chinese refer to this as a TO-94 package.

I  did a Rube Goldberg conversion of one of these lamps into a solar 5-volt power supply, similar to what was described by TalkingElectronics.com‘s writeup. I have had an ultimate plan to use one of these to power an Arduino (really an ATmel ATtiny84 or 85) in a remote installation but I suspect that current limitations may preclude this. I may try a 3.3-Volt converter suspecting that it will yield a little more current but I still doubt that the current will be enough to do anything meaningful. Posted research by Radio-GHE’s website hints that I’ll never get anything more than a few milliamps. My circuit modifications are shown in the schematic below:

Modified Lamp Circuit

Conversion to 5V Power Supply

As you can see from the photo above, my circuit yields 5.1 Volts. I did a load test, of sorts. Using two meters, I measured the voltage while simultaneously measuring the current through a 10k-ohm potentiometer that served as a load. Adjusting the potentiometer I found that the circuit provided .424 ma at 4-volts (yes, 4/10s of a milliamp!). This was rather disappointing – only 0.001696 Watts! The load resistance was 9.4kΩ I am abandoning any thought of using these lights for anything other than their intended purpose – illuminating a single LED. However, these lights are interesting little packages of rather clever engineering. [NOTE: I have learned that dropping the inductor down to around 33uH will provide usable current – in the order of 22-26mA.]

UPDATES:

  • Check out THIS-POST for some interesting information on this chip.
  • Reader “Peter” posted a good comment and referenced a blog named “Tom’s Projects” wherein he describes his successfully modified a similar garden light to power a thermometer with Morse code output on an LED as well as providing the 3.3V supply for its ATtiny25 controller. I assume that Peter and Tom are actually the same person. In any case, he has successfully achieved my objective, at least at the 3.3V level. His series of three posts are excellent and I encourage you to read them. They are Part1, Part2 and Part3.
  • An anonymous commenter to “Tom’s Projects”  references a good Russian article about how to make a YX8018  stabilized power supply. The Google translation version is at THIS-LINK or the original Russian version is HERE.
  • An excellent article on the YX8018 operation is at wiki.analog.com.
This entry was posted in Electronics, hardware and tagged . Bookmark the permalink.

33 Responses to Garden Light – Updated

  1. John Harris says:

    I was also involved with LED’s as part of my job at the University of New England. When the first red/green LED appeared there were no drivers for them available, so I made up a circuit to change the current direction and hence the colour on a binary 1/0 input. I tried to patent it but was warned that a search would cost me an arm and a leg, and by the time it was registered all the commercial big boys would have them on the market. This was so, of course.

    Like

  2. mi says:

    nice approach; i think you do understand that using a 5v1 zenner + 200ohm you limit the output curent to about 25mA. also, if you do the math, 5v1 / 10k = 0.0005A = 0.5mA…, exactly what you got.
    by it being just a charge pump, try allready just to get rid of the 100uF cap or go lower to 1uF, and modify your inductor (go up to 1000uH or down to 100uH and see the results. )

    just bought few of them just to get a 9V dumb charger to my multimeter accu. so i’ll be using just the pv cells. if it comes handy this wkend, i may just try to mod the “coil” and add zenner as you did. hopefully, i’ll update the post w/ results. .

    Like

  3. mi says:

    just forgot to “check” the Notify me of follow-up comments via email 😉

    Like

  4. celem says:

    Both of my lamps died and the Dollar Tree no longer sells them. If they get more I’ll try your suggestions.

    Like

  5. Ron says:

    Here’s a thought. The YX8018 only runs ‘after dark’ and switches off the LED during the day to charge the battery. You could get four units, remove the 560uH inductors and LEDs and just connect the four batteries in series (with the other circuitry in place, using only the charger part of the YX8018).

    That should give you 4.8 to 5.0 volts at 600mA hours when fully charged. In theory, about 3 watts of power.

    Like

    • James Deans says:

      I did something similar using 3 units to charge 3AA batteries and to switch 10 LED’s.
      It worked fine on the LED side, running 5 parallel banks of 2 LED’s in series.
      The YX8018 can easily handle the combined battery voltage of 3.6v (and probably quite a bit more) and the current required for 10 LED’s (and probably many more, but I only needed to run 10 for my project)
      A small problem arose on the battery charging side, when using 3 solar cells in series:
      In sunlight each cell can produce 2v+ and at quite a decent current. This caused the YX8018 and the inductor to overheat. I never actually burnt them out during testing, but I was sure they wouldn’t last long in the field if I didn’t do something.
      Luckily it was simply a matter of putting a rectifier diode and a resistor between the negative of the solar cell and the battery pack, allowing a fair amount of current to bypass the rest of the circuit and charge the batteries.
      I can’t remember the actual resistance I used, but it was a bit of trial an error as I still needed enough current going into the YX8018 for it to detect, to keep the LED’s switched off in sunlight – and not to switch on with a little cloud cover, or just too early in the evening.

      Like

  6. Your name here says:

    discrete, not ‘descrete’

    Like

  7. OHAJ says:

    replacement YX801 ?

    Like

  8. Igor says:

    If you had tested the piece of PV first, you could save you all the trouble. The PV offers 2.0 v in open circuit and 25 mA max, with direct sunlight, it is reduced to 20 mA with 45 angle of the sun.
    I can hardly see how you can get 5 v from there. By the way, the LED drains 10 mA, and there is not enough time charge the battery, unless installed in the tropics, on summer time. The current drops to 5 mA when cloud covers the sun.

    Like

  9. Scott says:

    From the IC data sheet inductor 82uh = 15ma, 150uh=10ma, it follows 560uh=4.5ma of battery current. Step up to 3.2v => 4.5/2.5= 1.8ma LED current at 3.2v. At best this would be ~1ma at 5v.
    Remedy: replace inductor with 82uh and triple the currents. Consider switcher efficiency…
    No need for the 200ohm going to the zener. No feedback on voltage, Circuit is a Current regulator. If using less than rated current the energy is wasted resulting in poor efficiency.
    Need a better diode, schottky for example, really will make a difference. Turn off time of the diode is key to making a switcher work efficiently.

    Like

  10. Ken Brown says:

    I found some halloween themed lights that have the same basic circuit for $1 at Dollar General. I’m finessing out the solar cell right now.

    Like

  11. Peter says:

    The current spec in the datasheet is the led pulse current, not the average current. The LED is on approx 45% of the cycle, so the avg. current will be 45% of this. I have done the maths & confirmed it with measurements. The current in the 2.5V table is wrong (actually a bit over 10mAav for 150uH (LED across inductor)).
    The LED (or o/p) Iav = (V1 x T1)squared/2LV2(T1 + T2) x 1000 mA
    where V1 is Vcc-Vsat.(~.02Vav during ON time), Ti is the FET ‘ON’ time in uS, T2 is FET ‘OFF’ time in uS, V2 is the avg LED vol.- Vcc during pulse, & L is inductor in uH.
    With such a high o/p vol., the inductor will run out of energy before the FET ‘OFF’ time, so current will less, &, in this case, will be determined by inductor energy, & vol. across inductor (Vout-Vbat)
    Energy in ind. per cycle W = .5L x Isq. I = V1T1/L so W = .5L(V1T1/L)sq = (V1T1)sq/2L
    If I got it right: Iav = (V1T1)sq/2LV2 ,where V2 is Vout + Vdiode – Vcc.
    I explained how to regulate it in Tom’s circuit blogs morse thermometer Pt2. (omit the 200 ohm res.)

    Like

    • celem says:

      Thanks for your comment. In my Garden Light post I have added a reference to your Tom’s circuit blogs morse thermometer project.

      Like

    • Peter says:

      Correction to above: Average o/p current Iav = (V1T1)sq/2LV2Ttot x 1000mA
      , where Ttot is cycle period in uS (1/FMhz) Average freq. of the 3 I tested was ~ 220KHz.
      T1 is about .55Ttot,~2.5uS, & Ttot~4.5455uS L is in uH
      L = (V1T1)sq/2IavV2Ttot x 1000uH
      This is a rough guide at best, as the actual o/p current is highly dependent on battery & load voltages (V1squaired & inversely proportional to V2 (Vload-Vbat)). If the load is a LED connected across the inductor as in the 2.5V cct., V2=Vload so current is more stable.

      Like

  12. acassis says:

    Hi Celem,
    Nice to know someone got it working, at least for 3.3V!
    Changing a little bit of context (to energy harvesting) did you see that:
    http://jeelabs.org/2015/05/13/micro-power-snitch-success/

    He is using a NXP LPC810/24 (similar to LPC11xx that I used to port the NuttX RTOS). This microcontroller could be used with this solar battery project to detect some external of home event and send an alert.

    Like

  13. Antony says:

    Wanting to put a rechargeable battery from:
    3.7V
    1400mA
    9,6wh

    Led: 3.04 – 3.4 V
    How could you take advantage of the driving circuit?

    Like

    • celem says:

      Antony,
      The QX5252F or YX8018 chips typically found in the $1 solar Garden lights are 2-Volt devices and aren’t suitable for a 2.7V Li-ion battery. However, a garden light equipped with a YX8181, YX8182 or YX8182B would work as those chips are specifically designed for 3.7V Li-ion battery use. You’ll have to do your own research on finding a lamp with one of these chips as I haven’t encountered one. However, I suspect that they would be in one of the more expensive, multi-bulb or brighter bulb specialty lamps. Good Luck.

      See:

      Click to access garden-light-asic-list.pdf

      Like

  14. Jose says:

    the YX8182 is used on solar shed light (item 62549) sold by Harbor Freight. Come with 3.2V Ni-Cad

    Like

  15. Karen says:

    Hi. I’m new to electronics and I’m about to try my first circuit on a breadboard. I have some old solar garden lights that I was going to strip out the components to recreate this circuit (I purchased some new solar cells because the ones on mine are shot). This page is great for explaining what’s going on. Added to this your page is the first one I have come across that explains the green component is an inductor and not a resistor. Every circuit diagram I have come across for these lights shows an inductor. I couldn’t figure out why mine had a resistor but no inductor. A resistor made sense because these LEDs usually need one. The missing inductor baffled me. Now I know it’s not missing. Haha. So thanks for this!!

    I have a few questions:
    1. Given LEDs normally need a resistor associated with them and these lights don’t have one does that mean the IC is managing this? Maybe through Pin1?
    2. Mine has a blocking diode on it which I expected. Yours doesn’t. Is there something else on here that I’m missing that is preventing current going in the wrong direction?
    3. Mine also has a non-polarized capacitor (the type with the small brown round/flat head and yours doesn’t. Do you know what this capacitor might be doing?

    Thanks again for writing this post!!

    Cheers.

    Karen

    Like

    • celem says:

      Re questions:
      1. Given LEDs normally need a resistor associated with them and these lights don’t have one does that mean the IC is managing this? Maybe through Pin1?
      REPLY: the LEDs that you see with resistors are because the supplied voltage exceeds the LED’s operating voltage and the resistor drops the excess. Refer to this link that explains this:
      https://www.petervis.com/electronics/led/led-resistor-calculator.html
      The Garden Light’s LED is white, which operates at about 3.3V. The IC in the Garden light boosts the 1.2VDC battery voltage to a nominal 3VDC which is also pulsed at a 5us rate. This is done to reduce the average current and thus prolong battery life. Consequentially, the voltage powering is more like 3VAC.

      2. Mine has a blocking diode on it which I expected. Yours doesn’t. Is there something else on here that I’m missing that is preventing current going in the wrong direction?
      REPLY: The LED IS a diode. There is no need for a second diode. Possibly your circuit needed to drop more voltage for some reason. Typical ordinary diodes drop around 0.6 to 0.7 volts

      3. Mine also has a non-polarized capacitor (the type with the small brown round/flat head and yours doesn’t. Do you know what this capacitor might be doing?
      REPLY: A small value disc ceramic capacitor, like you describe, would probably be there to reduce high frequency noise that could, for example, interfere with nearby radios.

      Like

  16. Pingback: Solar Garden-Light Failure Autopsy | Detect And Zero Rightmost One

  17. Pingback: Holiday Solar Garden Light – Lamkerad

  18. David says:

    I’m looking at modifying my own garden lights that use this chip and was hoping you could help with a question I have. If I control the led on/off function independantly i.e. place a switch inline from the negative poll of the LED and choose to switch off the led when it ‘should’ be on i.e. when solar panel is producing next to no current how will the XY8018 react to this. Will it recognise the low current from the solar panel and switch the current to the led circuit but find no draw and revert back to the charging circuit? If it does that and because it is now dark outside will the circuit then drain the battery because the solar panel is now acting like a resistor? Sorry if my explanation is poor or uses the wrong terminology i’m probably a little out of my depth being on this page. All help is appreciated.

    Like

    • celem says:

      David: I have not tested this condition BUT I believe that the Boost circuit will stop oscillation because the diode (LED) return path will be removed. Your goal seems to be a solar battery charger? Your question is will the solar panel now drain the battery? Without knowing the exact circuitry within the YX8018 chip I cannot say. However, according to wiki.analog.com, there is an internal diode that will cause a 30 uA drain. 30 uA isn’t much so your battery should remain adequately charged.

      Like

      • David says:

        Mnay thanks for the reply. My aim is to control the period when the lights are on and off. At the moment they run until the battery is flat which for the winter months in the UK don’t allow much time in the day to recharge the battery to any great extent. I have a remote on/off wireless circuit that can act as inline switch and my first idea was to place that switch at the negative end of led circuit thus stopping the charge being depleted. Then only switching on the led when its absolutely needed i.e. when you open a back door etc. The on/off element would also help to stop the flickering between states as the sun drops or having half the lights come on first before the rest. My concern was if I stopped the led from drawing a current the state would revert back to the charging circuit which is receiving no charge from the solar panel which would then act as a draw and deplete the battery. Or because the switch is not made to the led circuit it continually jumps between the two and again depletes the battery. Any suggestion on where the switch should be placed would be most appreciated.

        Like

        • celem says:

          David: The simplest solution would be to insert the switch contacts in series with one pin of the LED. Polarity won’t matter if your switch contact is mechanical.

          Like

          • David says:

            And you can foresee no problem with the solar panel being connected to the battery even when its not suppling a current? I assume the IC should cut the circuit between the battery and solar panel once the supplied current has dropped.

            I’ll put in the inline switch where you have recommnended.

            many thanks for replying – much appreciated.

            Like

          • celem says:

            David: I do not. However, I don’t have access to the YX8018’s internal circuitry so I cannot be sure. The garden light is inexpensive so give it a try.

            Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s