A challenge - tri-color LED indicators

Started by Mark Hammer, November 05, 2012, 08:50:58 AM

Previous topic - Next topic

Mark Hammer

I bought some tri-colour (RGB) LEDs.  Unlike some older formats that provided essentially a back-to-back pair, with red running opposite polarity to green (all in the same casing, with only 2 leads), these have 4 leads: a common anode and 3 cathodes, one for each colour.

What this permits is use of the various colours individually, or in combination (to produce other colours), without having to install separate LEDs in order to have different colours signalling different states.

Now, it is child's play to wire one of these up with a standard 3PDT stompswitch such that it glows green in effect mode and red in bypass.  I'm curious about how one might implement multiple colours when using an LED like this in electronic switching circuits.  For example, say you had an arrangement where multiple presses of a momentary switch like this one - http://hammer.ampage.org/files/quadsequentialswitch.pdf - would allow for "scrolling" through multiple states, in round-robin fashion, using the different colour combination possibilities of the tri-colour LED to indicate state.

I'm guessing that if one used an Arduino to save and apply "presets", it might be easier and cheaper than what is required for doing it in the analog/CMOS domain.

Morocotopo

In easy form you should get 10 colors, I think:

- each one
- combos of two
- all three

But that would require a 3 pole 10 position switch just for the LED´s!

:icon_eek:

Good luck...
Morocotopo

oldschoolanalog

>I'm guessing that if one used an Arduino to save and apply "presets", it might be easier and cheaper than what is required for doing it in the analog/CMOS domain.<

Big time +1.
Mystery lounge. No tables, chairs or waiters here. In fact, we're all quite alone.

R.G.

Your idea is correct, Mark. With the three fundamental colors of the color wheel available, you can achieve nearly any color by adjusting the intensities of the three.

That requires analog or PWM mixing to do, but you can get seven colors with only solid on-off switching: the three individuals, the three two-at-a-times, and all three on.

If you put in a full-power and a half-power resistor and a second set of three on-off switches for these conditions, you get three half and three full individuals, and a slew of mixtures of two and three LEDs full and half power.

Any discrete-logic or analog methods to do this would be tricky except for one: the comparator ladder, which is easy to do with an LM3914, which will give one of ten switched outputs to an analog input voltage. A programmable part will do a lot more, including the PWM for most modern ones. These can be had for under $1, sometimes a lot under $1.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

deadastronaut

#4
i have a couple of those 4 pin leds....

be nice to have a proper purple...not UV.. :icon_cool: :icon_cool: :icon_cool:


edit.
http://www.youtube.com/watch?v=qDajSADjTX4&feature=related
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Mark Hammer

Quote from: R.G. on November 05, 2012, 09:20:17 AM
Your idea is correct, Mark. With the three fundamental colors of the color wheel available, you can achieve nearly any color by adjusting the intensities of the three.

That requires analog or PWM mixing to do, but you can get seven colors with only solid on-off switching: the three individuals, the three two-at-a-times, and all three on.

If you put in a full-power and a half-power resistor and a second set of three on-off switches for these conditions, you get three half and three full individuals, and a slew of mixtures of two and three LEDs full and half power.

Any discrete-logic or analog methods to do this would be tricky except for one: the comparator ladder, which is easy to do with an LM3914, which will give one of ten switched outputs to an analog input voltage. A programmable part will do a lot more, including the PWM for most modern ones. These can be had for under $1, sometimes a lot under $1.
Okay, NOW you're in for trouble...because you got me THINKING.  That was your first mistake.  :icon_lol:

So, if we have, via selectively combining LED sections and their respective intensities, most of the visible spectrum available to us in one single indicator, AND we place that indicator under control of a PIC, or whatever, would we not, in theory, be able to use that LED as a modulation indicator MUCH "smarter" than a simple tap tempo flash?  Imagine a modulation effect, and the single LED moves back and forth through a sub-spectrum of colours that not only shows you the rate of modulation, but the width and where in the overall range of modulation it is.  A phaser set for the lowest part of its range might cycle from red through to orangey-yellow and back, while a slow wide sweep might start from orangey-red, sweep through amber, yellow, green, turquoise to blue and back again.

...or am I dreaming in technicolor?  :icon_wink:  :icon_rolleyes:

armdnrdy

Mark,

Take a look at how the dual color common cathode indicator LED is implemented in the Infinite Flanger. Some really cool guy has the schematic on his site. I think the site is called Ampage ;)

You might get some ideas from this.
I just designed a new fuzz circuit! It almost sounds a little different than the last fifty fuzz circuits I designed! ;)

R.G.

Quote from: Mark Hammer on November 05, 2012, 10:20:18 AM
...or am I dreaming in technicolor?  
Technically - yes.  :icon_lol:

As the Chinese detective in "Murder By Death" said, "Answer easy. Question, veeery hard."

That's one entirely possible and practical solution.

As the programmer-elves used to say, though, it's A Simple Matter Of Programming.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Mark Hammer

Quote from: armdnrdy on November 05, 2012, 10:54:10 AM
Mark,

Take a look at how the dual color common cathode indicator LED is implemented in the Infinite Flanger. Some really cool guy has the schematic on his site. I think the site is called Ampage ;)

You might get some ideas from this.
I was thinking of friending him, but I hear he's a real douche.  :icon_wink:

But hey, my job is just to post the stuff, not to remember that I posted it.  :icon_lol:

armdnrdy

#9
That's funny!

I built this thing and depending where the "center" (clock frequency) pot is, the indicator does roll through different colors.

You might try breadboarding this circuit and connecting it to different sections of a circuit. (LFO, rate control) See what happens.
I just designed a new fuzz circuit! It almost sounds a little different than the last fifty fuzz circuits I designed! ;)

alparent

Quote from: Mark Hammer on November 05, 2012, 11:42:29 AM
I was thinking of friending him, but I hear he's a real douche.  :icon_wink:

I eared that also...... but once you get passed the overalls and the 50 year old cowboy shirt........he turns out to be a very decent friend!

amptramp

Quote from: Morocotopo on November 05, 2012, 09:08:17 AM
In easy form you should get 10 colors, I think:

- each one
- combos of two
- all three

But that would require a 3 pole 10 position switch just for the LED´s!

:icon_eek:

Good luck...

There should be eight states:

0. off
1. red
2. green
3. blue
4. red + green = yellow
5. green + blue = cyan
6. blue + red = purple
7. red + green + blue = white

A three-bit counter could step through them in sequence or you could have colours tied to each item of functionality.

PRR

> Arduino ... might be easier and cheaper than ... the analog/CMOS domain.

Nah. This minor mod of Fluharty's plan will give 16 distinct states:



Yes, some states are differentiated by green intensity. When green-alone, this is poor (it may be better when it is more/less green with another constant-intensity color as reference).

BUT: daily driving tells you that many people can just about manage the three colors of a traffic light. Yes, an old ad for color film said Japanese eyes can distingush 40,000(?) shades of color, but I don't have those genes and they did not test with stage-lights and color-bars and disco-balls in our eyes. Also a large % of US males have color-blindness, one color reads as grey. So while it may be a cool light-show, I would not try to sell it as the only indicator of pedal state.

> a common anode and 3 cathodes

*After* I hacked that, I realized you can get them common-cathode. This makes the hack simpler and better, but my mouse is tired.
  • SUPPORTER

slacker

A slight tweak to Paul's thing would be to use "diode logic" between the cathodes and the collectors of the transistors. This would let you select any of the 7 colours you can get from combinations of On and Off for each stage. The current limiting resistors would also need moving to between cathodes and the diodes.

I'm actually working on something similar at the minute. I've built a multi effects pedal using the Spin FV-1 which has a LCD display to give info about each patch, I'm using a display with an RGB backlight driven by a Pic so I can have a different colour for each patch. I was going to just use combinations of On and Off to get different colours but I've got eight patches and only 7 colours, so I switched to PWMing the LEDs instead.

It needs some work, but the code could easily be adapted to make an RGB LED do pretty things.

electrosonic

Here is my (untested) plan.

The green led lights up for a few seconds when the pedal is plugged in to indicate it has power.
The blue led indicates the pedal is engaged
The red led lights up if the wrong polarity adaptor is plugged in (or AC power).



Andrew.
  • SUPPORTER

Mark Hammer

Some interesting ideas here.  Clearly, there are a bunch of things one might start pondering with a multi-colour LED.

Here's another: any circuit with a side chain (limiter, compressor, noise-gate, expander, autowah, etc.) might be able to use a multi-colour indicator LED to signify the strength (and maybe dynamics) of the envelope signal, in addition to the effect being on.

Jazznoise

Sigh, Mark, I've been running with this idea for a while. But I guess geniuses are those that do, eh?

The blue light on these is signifigantly brighter, on mine at least, so that has to be adressed. Getting white, white light is quite tricky. It tends to be rather bluish and cold.

My idea was for, say, a filter where the LFO would modulate the G cathode, the Bypass the Red and maybe an Envelope Follower the Blue. This would give some fairly complicated information in a very cool visual way while..looking really cool.
Expressway To Yr Null

Mark Hammer

Whatever the present complications, Chris, I'm confident, given the way that LEDs have been changing and developing, that you/we will eventually have something with roughly equivalent brightnesses for R G and B, such that compensation will not have to be built in to the support circuit somehow.

Certainly part of what has sparked my interest in ways to use tri-colour LEDs was staring at a 10-segment meter-type LED array and thinking "How the heck am I going to machine a space for, and mount, that thing?".  A single small round object is so much easier to plan for and machine.

amptramp

You could modulate one of the LED's with the LFO for a tremolo, phaser or chorus pedal.  The other lights could be "Power Applied" and "Effect On".