Monthly Archives: December 2011

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.

Dissecting a set of $.99 battery powered Christmas lights…

I was over at the CVS repository today, and saw that they had some small strings of fifteen LED Christmas lights on sale for a paltry $.99 (if you used your CVS discount card). That was simply too much to resist, so I got a couple of strings, and thought that I would use them for a Christmas related electronics project of some sort.

And, of course, it provides a reason to test your basic electronics knowledge as well. (Forgive my more technologically saavy readers, this is gonna be pretty basic, but I found it fun to go through the mental exercise).

First of all, here are photos of the box they came in, just so we are all on the same page:

When you pop them open, you’ll find a small greenish plastic box that holds the batteries, and a string of fifteen LEDs wired into it with green wire. The box has a small switch on it, which if you stare at you’ll see has both an OFF and an ON position, but it can also be set half way to enable a blinking function. Popping two batteries into the case and flipping the switch had the desired effect: Christmas lights!

So, I started staring at them. There are three wires coming out of the battery box. Each LED appears to have five wires operating in its vicinity. One bypasses the LED, and four other wires sprout from each LED (except for the very last one on the string, which just has two connections. A few minutes of thinking reveals that the LEDS must be wired in parallel, with a circuit that looks very much like this:

Ed. note: Mike pointed out that the original schematic was in error. This has been updated.

The lines labelled A and B are just two power lines: each carries power to half of the LEDs. In the “blink” mode, power is applied to only half of the LEDs at a time. Staring inside the box, it appears that there are two discrete plastic cased transistors wired together: my guess is that they are a classic multivibrator circuit. I’ll verify that later.

Okay, enough of boring reality, let’s try to get to the exciting math.

First of all, the package says that we can get “120 hours or more” from one (presumably) set of alkaline batteries. That seems like excellent battery life, but how realistic is it?

First of all, how much power is in a pair of AA alkalines? Wikipedia says we have about 1800-2600 mAh. I bought some cheap AAs from CVS, so let’s say we are in the middle of the range, about 2200 mAh. Naively, to last 120 hours, the current draw can only be 2200 / 120 or about 18ma (this isn’t quite right, but it’s close) which works out to about 1.2 ma of current per LED (did I mention that the LEDs are wired in parallel?). The total power consumed is about 50mw. If we assume the voltage drop from the LEDs is around 2 volts, we need we need to have a series resistance of about 1 v / 18ma or about 55 ohms. It can be a tiny one, since the power consumed is very small.

All this presumes that they were all in parallel. In reality only half the current flows in each of the A and B circuits, so in blink mode, I suspect the power consumed will be cut by one half (ignoring the power consumed by the multivibrator, which should be very low).

But here’s the good thing! The current draw is low enough that it should be possible to power these lights directly from an Arduino, without any additional switching transistors or the like. My intention is to power each of the two strands with a PWM signal, to allow independent fading and glowing.

But I don’t trust my math enough (nor the specified 120 hour life) to just hook this up randomly, so I’ll be doing a little dissection when I get home tonight, to verify that my calculations are roughly correct. Stay tuned!

Addendum: I took a closer look at the tiny circuit board inside the battery case, and was somewhat surprised to see its inner workings hidden under a blob of epoxy. Two driver transistors do appear on the top side. As far as I can tell, no caps or inductors are visible anywhere:

Addendum2: Last night I put my multimeter in series with the batteries in this circuit, and measured a current draw of 40 milliamps in its “steady”, non-blinking mode. That means that the 120 hours on two AAs quoted on the box is likely a fiction, a life of more like 55 hours would seem to be more likely. In blinking mode, the current draw seemed to vary between 20ma and 30ma, but my meter wasn’t able to integrate the current to a stable value.

I’m thinking that I’ll resurrect the circuit that I used for my ATtiny13 powered pumpkin to drive these LEDs. The ATtiny13 has two PWM channels, which could be used to drive the two LED channels separately, allowing some cool color fading effects. I could probably even salvage the case to hold the batteries. Stay tuned.

How to make a CheerLights controller with Arduino and ioBridge

As the holiday approaches, it seems like making some kind of blinkenlights project would allow some fun hacking, but also be within the spirit of the holiday. I encountered the idea of “CheerLights” during my morning surfing. The basic idea is to create a global network of colored Christmas lights, all of which change color simultaneously as they receive update notices via the Internet/twitter.

How to make a CheerLights controller with Arduino and ioBridge

The project makes use of GE Color Effects lights, which are cool because they are individually addressable RGB leds on a single control bus. I don’t think this project really makes adequate use of that feature, but it’s still pretty cool. The author uses an ioBridge (which he is the creator of) which seems like a very cool gadget, but which is pretty expensive ($120). I could probably write a little gateway between my home server and the Arduino via Xbee, which would be quite a bit cheaper.

Pretty neat idea though, and getting me thinking of a Christmas project…

How to lose $2400 in 24 seconds… with a story of my own

We have a bunch of photography enthusiasts where I work, and on Friday it is common for people to exchange their photographs and photography-related stories on a local email alias. Today, someone posted a link to this rather tragic video, which reminded me of a story. Go ahead, watch the video.

how to lose $2400 in 24 seconds from Kurtis Hough on Vimeo.

Okay, now the story. It starts somewhat sadly. My mother Beverly suffered a pretty serious stroke in her early fifties. In those early days, she had a lot of problems: with her vision, with her balance, and with periodic seizures. Not a very fun time for her, or for the people who cared for her, and about her. A couple of years later, I started dating my wife Carmen. It was near the holidays (if memory serves) and I decided to take Adam (our son) and her to go visit Mom near the holidays. At that time, she was walking, and we decided on a drive to the Oregon Coast to stretch our legs and enjoy ourselves. With all her hospitalization, she hadn’t been to the beach (which she loved) in several years, and the prospect made her happy.

Here is the thing about the Oregon Coast, particularly in the winter. You have to be a bit careful, because the waves can seem very peaceful and well behaved, but can suddenly go rogue and you’ll find one running a good twenty yards or more further up the beach than you expect. Thus, my Mom always warned me to not turn my back on the ocean: be aware of your surroundings.

Of course, when your mother who has had a stroke is on the beach, your attention isn’t on the waves, it’s on her. And of course that allows the ocean to sneak up behind you.

We were walking along in the moist area of sand where the lapping waves will occasionally cool your feet, and chatting and talking. Adam was running around (I think he was about 11) and having a great time, when I realized something was about to go wrong. A much larger swell was forming and was already too near to avoid. When it contacted us, it was above my waist, a good 4 feet tall. I managed to remain upright, but Mom was knocked off her feet and was floating with the wave (at first somewhat inland, but as the wave quickly reversed itself and began pouring back out to see, she floated toward Japan).

Adam was a hero. He had regained his feat and had reached my Mom pretty much as quickly as I did. We got her back on her feat, and made sure she wasn’t hurt.

She wasn’t. She was laughing. Harder than I had heard her laugh in a great while.

When she recounted this adventure later, she said that until then, she had thought that maybe she wouldn’t have any adventures anymore: that the stroke had taken those away from her. After nearly doing a solo crossing of the Pacific, she decided that if she was healthy enough for that to happen, perhaps there were still some adventures (and joys) to be had.

She didn’t do a lot more ocean voyaging, but she told stories. She painted. She quilted. She made her children laugh. She made her grand children laugh. She even got to see great-grandchildren. She talked to me a lot about cooking. Over the last couple years, her condition got a lot worse. She passed away in July. I miss her.

Losing $2400 in camera equipment seems bad, but I nearly lost my mother. But that’s the strange thing: by almost losing her, I got her back, at least for a decade. I’m glad she found the courage to struggle on, both for her sake and for ours.

For that reason, big waves just don’t seem that tragic to me. 🙂