If you’ve been reading my columns for any length of time, you’ll know that one of my long-term projects is my Inamorata Prognostication Engine (don’t ask). As shown in the image below (and on this YouTube video), this bodacious beauty is festooned with toggle switches, pushbuttons, knobs, and dials (I’m sorry for the poor quality of this image, which I just took with a smartphone).

A portion of the Inamorata Prognostication Engine’s main control panel (Click image to see a larger version — Image source: Max Maxfield)

I’m a firm believer that you can’t have too many LEDs. As I’ve been known to remark on occasion, “Show me a flashing LED, and I’ll show you a man drooling!” In the case of the Prognostication Engine, there are two LEDs associated with each toggle switch and pushbutton. Meanwhile, every knob boasts a ring of 16 LEDs.

All of these LEDs are tricolored NeoPixels from those little scamps at Adafruit. At the moment, I’m using the classic rainbow pattern from Adafruit to light up all the pixels and make sure everything is tickety-boo, but now I’m poised to proceed to the next stage.

On the bright side, the main control panel with all the switches, pushbuttons, knobs, and dials can be detached from the main cabinet so I can take it home to work on it. On the downside, this is still a somewhat bulky (and definitely fragile) piece of kit, so I want to minimize the number of times I have to transport it anywhere.

In order to address this conundrum, last night I created a simple test bench comprising a toggle switch and a 10K linear taper potentiometer. The switch has two tricolored NeoPixels associated with it, while the potentiometer has a 16-pixel ring.

A simple test bench (Click image to see a larger version — Image source: Max Maxfield)

Now I’m poised to start pondering the different types of LED effects we might implement. In this column, we will focus on the toggle switch. The simplest case would be to use two colors to reflect the positioning of the toggle as illustrated in the graphic on the lower-right-hand side of this column. Whichever side the toggle is on (we might think of this as the “active” side), that LED could be yellow, while the other side (the inactive” side) could be red.

Note that I’m currently planning on predominantly playing with reds, oranges, and yellows (possibly pinks and purples) because I think these will work best with the wood and brass Steampunk aesthetic of the Prognostication Engine, but I might be tempted to experiment with other colors also.

So, the initial effect is that when we flick the switch to the left, the left-hand LED turns yellow and the right-hand LED turns red. When we flick the switch to the right, the right-hand LED turns yellow and the left-hand LED turns red.

OK, this isn’t bad, but it’s not exactly earth-shattering. Is there anything we could do to jazz things up a bit? Well, one idea that comes to mind would be to have whichever LED is changing to yellow flash three times (flash-flash-flash-on) before settling into its permanently ON state. Another option when the switch is toggled is to have both LEDs fade from their original colors to their new colors (fade-red-to-yellow and fade-yellow-to-red) over some period of time (say half a second).

Using two colors to reflect the position of the toggle (Click image to see a larger version — Image source: Max Maxfield)

We could also use a combination here, where a transition on the switch causes the newly “active” side to immediately transition from red to a flash-flash-flash-on yellow, while the newly “inactive” side performs a fade-yellow-to-red.

Suppose no one touches the switch for some time; say 15 minutes. After that time, maybe we could make the red (“inactive”) LED fade to a low brightness, while the yellow (“active”) LED starts to “breathe”; that is, gradually fade up and down (I’ve also heard this referred to as the LED “snoring” on the basis that we’ve entered some sort of sleep mode).

One last point to ponder (for this blog) is what do we do when the system is first powered-up. This isn’t a time to be shy and retiring — we will have to have some sort of power-on effect that effectively says “Tra-La!” using light instead of sound (of course, we will have sound also, but that’s a topic for another day).

Of course, since all of the Prognostication Engine’s LEDs are tricolor, we could implement all sorts of additional effects. Over to you — can you think of any other effects I should be experimenting with. I will of course be videoing everything and reporting back in a future column, so now would be a great time to offer suggestions and we’ll see how they turn out.