Improving the Menorah kit

Scale

 

One of our favorite little kits is our Deluxe LED Menorah kit. Since we introduced it two years ago, one of the most common questions that we get asked is this: “Can you use candle-flicker LEDs in it?” And thatturns out to be a very interesting question.

 

 

The simple– but, alas, naive –answer is “yes.” We have discussed candle-flicker LEDs in the past, and in most cases, yes you candirectly substitute them for regular LEDs.

 

But if you do go ahead build up a menorah kit with the candle-flicker LEDs,
what you will find is that the performance is simply terrible: Not only do these LEDs fail to perform properly– (there is no “candle flickering”), but they actually exhibit behavior that we might categorize as “not even wrong”– the LEDs are not particularly steady either, but are rather a bit weak and jittery.

 

The reason for this is that in the kit, the LEDs are not left continuously it, but are instead continually– and far too quickly for the eye to see –pulsed on and off. This is done because the menorah kit uses pulse-width modulation (PWM) dimming to produce a range of different brightness levels. Not only does the menorah have two different selectable brightness levels, but it also has the ability to softly “fade in” and “fade out” the LEDs when they light up or switch between the brightness levels.

 

In most ways, this PWM dimming is a wonderful thing. It allow us to create these gentle fades and different brightness levels, and allows us to really fine-tune the performance for better power efficiency. While this works extremely well for regular LEDs, each of the so-called “candle-flicker LEDs” is not just an regular LED, but is actually a regular LED packaged with a tiny integrated circuit that executes the “random flicker” program. And, that chip can only execute its program properly if it’s left on continuously. If instead, it is continually pulsed on, we might indeed expect to end up with the kind of jittery, inconsistent behavor that we do see in the kit.

 

 

How could we go about fixing this, if we wanted the LEDs in our menorah to flicker? It would be straightforward to remove the dimming features from the software, and actually use the self-flickering LEDs in a mode where we leave them on continuously. But in doing so, we would lose a couple of our favorite features: the gentle fade-ins that make the kit so elegant, and the ability to have multiple brightness settings.

 

 

So that’s a tough choice: Do we forgo flickering, or live without our elegant gray scale fades?

 

But fortunately, there is a way out. The right solution is to remember that we do have a microcontroller– an ATtiny2313 –running the show, and to start acting like it. If we go back to regular (non-flickering) LEDs, we should be able to write a “random walk” flickering algorithm and add that to our existing firmware. In doing so, we can keep our original fades and brightness modes. We also can keep the kit price the same (since we don’t need the more expensive flickering LEDs), and as a hugeadded bonus, we can now turn on or turn off the flickering at will– something that you can’t do with LEDs that always flicker.

 

Today we’re releasing the new version of the menorah kit software, and shipping it in the kits. And, we made a little video(embedded below) to show off the new flicker modes and what happens when you try and use flickering LEDs with PWM:

 

 

 

The new source code– Menorah kit software version 1.3 –is available here, and it can be used to upgrade any older Deluxe LED Menorah kit as well. :)

14 thoughts on “Improving the Menorah kit

  1. You can turn off the flickering on a flicker LED – you just can’t turn it back on again after!

    My six-yer-old connected a flicker LED briefly to a 9-volt PP3 battery. It (unsurprisingly) turned the flicker circuit into a black mess but rather more surprisingly the LED still worked, absent the flicker.

    Overall, I think your way is better!

  2. does not look like an arduino bootloader in there, can I add header pins and re-program inline? I dont think I own the right programmer to do that yet, but I’m willing to upgrade ;)

    1. The ‘2313 does not actually support an Arduino-style bootloader. This board does have a 6-pin "ISP" header location for an AVR ISP programmer, the same type used (for example) to program the bootloader on an Arduino board. A good choice is Adafruit’s USBtinyISP.


      Windell H. Oskay
      drwho(at)evilmadscientist.com
      http://www.evilmadscientist.com/

      1. Is it really 5am where you are? Time for evil mad scientists to get some sleep. I do have an Olimex icd2-pocket that claims avrdude compatibility. I may play with this later on ;) Otherwise adafruit getting some more business later.

  3. Hi Oskay,

    Did you reverse engineer the flickering LED at all? A recording digital scope or other reading across a resistor to the flickering LED would give a nice plot of its current draw and flicker pattern. I’m a bit curious if a flicker LED is more efficient than another LED of the same peak brightness, or if they manage to waste the power in the flicker circuit.

    Ben

    1. We haven’t done a technical analysis or real data recording of it. I can tell you that it’s simply on-off in its operation, and that it does take a tiny bit of voltage headroom. So does it use less power? I believe so, but it’s also *not* 100% as bright, even in the on portion of its duty cycle. There’s more information in our previous article as well, here.


      Windell H. Oskay
      drwho(at)evilmadscientist.com
      http://www.evilmadscientist.com/

      1. If it’s any measure, the white candle-flicker LEDs lasted well over 3 weeks on a CR2032 Li battery, where a normal white/blue LED lasts somewhat over 2 on the same batch of batteries (the lamps from the Halloween pumpkins were kept long after the organic part had been disposed of). Not exactly a controlled test but I think it suggests that they draw a lower average current, even allowing for the losses in the flicker circuit.

  4. Brilliant – no pun intended. I will definitely take a look at your flicker algorithm, I am curious how you implemented it. The end result is beautiful.

    Very nice work, Windell!

    -Jeff

  5. Just came across your site. Love it. The Menorah brought back a lot of memories of my time as a sonarman riding diesel submarines in the 60s. At slow moments on patrol, some us (ETs, Radioman, and us Sonarman would basically raid electronic spare parts and try to create different gizmos and gadgets. The Menorah reminds me of what we called an idiot box. It was simply a wooden index file (do they even make them anymore?) in which we put a 9volt lantern battery. Internal wiring consisted of various resistors and capacitors connected to a series of NE51 bulbs fastened to the top of the box. The bulbs, depending on the wiring pattern would flash either randomly or sequentially. I have not played with electronics, other than building my own computers, since the early 70s. You gentlemen/ladies have gone way beyond our simple puttering. I am glad to find this site.

  6. I made my own enclosure and it’s a bit tight. Anybody know what the current draw of this is using the white LED’s in flickering mode? I’m trying to figure out how long it will last if I use 3 AAA’s instead. I kind of messed up and didn’t leave enough room for 3 AA’s. I just need it to stay on for 8 days, obviously.

    Thanks

Comments are closed.