Daily Archives: 12/6/2011

More on $.99 Christmas lights…

I didn’t have a lot of time to do anything significant tonight, but I wanted to test a few things about this strand of Christmas lights using a multimeter and some simple math.

Recap: there are two strands of LEDs, each wired in parallel. One strand consists of 4 red and 4 yellow LEDS. The other has 4 blue and 3 green LEDs. When powered by two AA alkaline cells, the two strands combine to draw about 40ma of current.

While mulling what I could do with them during the day, it seemed obvious that I could use my ATtiny13 pumpkin circuit to drive the LEDs. While the ATtiny13 is just an 8 pin DIP, it has two PWM outputs, each of which could drive one strand. My pumpkin was powered by 2 AA batteries. The ATtiny13 should have no problem sinking 40ma of current on two pins. Since the LED strands can be powered by just 3V, I could run the entire thing off just the two AAs.

But there is one thing that is a bit wonky: the yellow LEDs. They are really dim compared to the other LEDs. One is sort of okay, but the other three are really feeble. I thought it was possible that maybe the yellows were just feeble (they usually aren’t as bright as good red or green LEDs), but I had another hypothesis: that the forward voltage for those leds was really close to 3v, and they weren’t really conducting properly.

To a first approximation, until the voltage across the diode reaches the forward threshold value, the diode doesn’t conduct. If the yellow LED was barely meeting (or not) meeting its forward voltage, then it’s not passing as much current as the other LEDs. In fact, in this parallel arrangement, it means that the other LEDs are passing more current than you would think (the overall current is still limited by the current limiting resistor in the circuit, but the balance is wrong).

So, I hypothesized that if I raised the voltage perhaps I’d get more even illumination. I hooked up a 5v supply, and… yes! the lights did seem a bit more even, and the yellows, while not exactly blazing, were at least reasonably illuminated. I then hooked up a ammeter to measure the current through the circuit. I knew it would be higher (obviously, since the LEDs were brighter). Indeed, it measured 120ma or so, nearly 3x the current. To keep the same 40ma current, I’d need some additional current limiting resistance. I tried inserting a 220 ohm resistor, and the green and blue strand were nearly completely extinguished, and only the red LEDs of the red/yellow strand were illuminated. Obviously the voltage drop across the resistor was too great to cause the forward voltage of most of the LEDs to conduct.

So, I dusted off a small 200 ohm pot from my junk box, and inserted that. I then tuned the resistance to match the 40 ma of current that we saw at 3v. And, indeed, while the current draw was the same, the illumination was quite a bit more even: the yellow LEDs were quite reasonable.

This suggests that maybe the right thing to do is to drive the LEDs with a bit higher voltage. I’m now thinking that I’ll power the ATtiny and the LEDs with a 9v battery into a 5v regulator. Since the capacity of the 9v battery is a bit lower, it won’t last as long, and we are wasting more energy in the current limiting resistor (I need to add about 47 ohms of resistance to lower the current draw to just 40ma) but I’ll get better illumination.

We’ll see how this works when I get it on the breadboard.

Upcoming Total Lunar Eclipse

Yep, there is an upcoming total lunar eclipse this Saturday, on the morning of Dec 10. It will be the last total lunar eclipse visible from San Francisco until April of 2014, so I think I’ll be trying to get up and see if I can view it and take some snapshots. From San Francisco, will enter the penumbra at 3:34 local time. You should start seeing it enter partial eclipse around 4:46, and it will begin totality around 6:06 (at only 12 degrees of altitude). Totality ends around 6:57, with the moon at about 3 degrees altitude.

I’ll probably get out my aircraft spotting binocs, and try some ghetto “through the eyepiece” photography. Stay tuned.

Correction: Schematic for $.99 Christmas Lights

I was in a hurry yesterday, and didn’t draw the LED connections in my schematic for the $.99 Christmas lights properly. Mike pointed it out to me on twitter, so I thought I’d post a corrected version of the schematic. I’ve also updated the schematic in the original post, so no one will be led astray by haste and carelessness.

A Blast from the Past: The Cinnamon Bear

When I was a kid, my brother and I used to listen to old time radio shows quite a bit. During the Christmas season, KEX 1190 in Portland would play episodes of radio serial The Cinnamon Bear. The program was originally suppose to air six days a week starting just after Thanksgiving and culminating on Christmas Eve. To this day, whenever I hear the theme, I smile and get a bit nostalgic. If you haven’t heard it before, set your clock back a few decades and give it a try, maybe with your kids or grand kids.

Here’s all the episodes.