picture home | pixelblog | qt_tools

omino code blog

We need code. Lots of code.

This post follows an earlier post.

More Measurements!

After a tantalizing near miss, I had to back up a bit to first principles in determining how to harness the mighty force of a $4 solar garden light to power a PIC chip in the evenings. But I really do want this to work… the idea of repurposing cheap consumer products to power my own gadgetry is just too appealing to pass up. It’s perfect for this use: pretty lights that activate automatically at night.

The solution, by the way, was to place a 5v zener diode across the output from the garden light, to protect the PIC circuit from overvoltage.

But because I had so much fun using an “oscilloscope” to understand the problem, I am compelled to here include and interpret the observations which led up to that solution.

Oscilloscope

Ah, the very word evokes sweet theremin tones. Traditionally, an oscilloscope was useful for observing periodic events and waveforms. Luckily, I have access to a modern oscilloscope which is digital and quite small and acts like a voltage-meter attached to a strip recorder. It was useful to understand the voltage swings of the solar garden light on a timescale of 10 or 15 seconds.

Run 1: Solar Garden Light With No Load

First experiment was to understand how the voltage multiplier responded with no LED or other load across its output terminals.

  • A: When the sun is out, the output is a steady 1v. Probably just the battery straight through, somehow. 1v is not enough to conduct through the LED.
  • B: Covering the solar cell for just a moment activates the voltage multiplier, and it charges up to 17 volts! With no load, it just sits there, discharging very slowly.
  • C: I touch the output terminals together for a moment, and it drops to zero, and then back to its default 1v.

Run 2: Solar Garden Light Attached to PIC Blinker

I knew that the solar garden light could power the blinker without necessarily destroying it. At least not ever time. So I risked it, to better understand what was going on voltage wise when it was running.

  • A: When the solar cell is covered, the voltage momentarily spikes to 7 or 8v…
  • B: …then settles down to 3 or 4v, very spiky, as the LEDs do a flickering on/off pattern.
  • C: All the LEDs go off for a little while, and the output of the solar garden light climbs up to 10v! The PIC chip specifies an absolute maximum of 7, but seems somehow to survive this.
  • D: The next pattern in the program begins: slow throbbing lights. The voltage drops back down to a reasonable 3 or 4v.

Run 3: Using LEDs To Limit The Voltage

Normally the output of the solar garden light is attached straight to a white 3v LED, and the voltage measured across the LED is, necessarily, always 3v. I reason thus: No matter what the voltage multiplier is doing, the 3v LED that came with it never gets fried, and runs at about 20mA. So, I continue to reason, although the voltage multiplier swings high with no load, pulling it down to 3v still only dissipates 20mA or so. That is: we can pull the voltage down by any means we like without fear of excessive current. So, what about using a pair of 3v LEDs to keep the voltage below 6v? (The PIC is rated up to 5.5v, but hey.)

  • A: A spike only to 6v. Safe and sane! The two blue LEDs flash briefly, as they are using any voltage over 6v. (Sort-of.)
  • B: Flickering LEDs pull the voltage down to 3 or 4v.
  • C: All LEDs go off… and again the voltage only rises to 6v; the two blue LEDs glow dimly.
  • D: LEDs come back on, voltage again hovers around 3 or 4v.

And The Solution Is: A Zener Diode

It turns out that a “zener diode” is a kind of diode which has, instead of the typical 0.7v drop, a calibrated drop of some other value. You can pick any value you like from a catalog. So, by placing a 5v zener diode across the output terminals it will dissipate (maybe) a few mA, and keep the power to the PIC chip down to a reasonable 5v. I got a tiny one rated for a half watt since the solar garden light never puts out much current.

The astute viewer (more astute than I) may notice the diode’s cathode marking is next to my scribbled + marking. Zener diodes are in some literal sense wired up “backwards” compared to normal diodes. The voltage rating is their “reverse bias breakdown voltage”. Ok, whatever. At least they use a slightly different schematic symbol, with a little jag on the cathode line.

And thus, I believe that this successfully harnesses the power of the cheap solar garden light!

Future Work

Future work includes: Optimizing the software to draw less power to maximize running time, by using fewer LEDs at a time. Analyzing other models of solar garden light; apparently some of them present a high-frequency pulsing across the output, which is fine for an LED but not so nice for a microcontroller.

Thanks
Thanks to Kerry V and Aaron F for their guidance and knowledge of the new electricity.

1 comments
Robert Soelberg // Mon 2007.06.25 02:222:22 am

David,

Your passion for unlocking the problems big and small continues unabated. I met you when you were writing software drivers for a graphics card maker and writing Ankh: 64 Rooms.

Your talents were so great, I was able to write a second game of 64 rooms.

Glad to see your are doing well.

Robert

oh, i dont know. what do you think?



(c) 2003-2011 omino.com / contact poly@omino.com