Minimalist LED

hippy

Ex-Staff (retired)
Another minimalist display challenge - How to get two or more colours out of a tri-colour LED ( Red, Green, common pointy ends ), and a single line of a PICAXE-08M.

The best I can think of is; connect it to the PWMOUT pin and use C's as reactance to turn one or the other on depending upon frequency of PWM.

Any thoughts or experience ?
 
I don't know about tri-colour LEDs.
But if you want to run a two color LED (with two pins) than use two resistors to make a voltage divider, connect one of the leads from the led to where the resistors meet and the other the the PWM pin :)
 
Could have a PWM signal driving RC and setting DC voltage. This voltage feeds into dual op amp, with each op amp having different gain. Output from one op amp drives Red connection, the other green. Not exactly minimalist though, and would only give two colours ...red or yellow, or green and yellow.

Edited by - jeremy leach on 29/03/2007 22:54:02
 
Aha, had another thought....

You've got two colours Red and Green. You want every combination:

<code><pre><font size=2 face='Courier'>
Red : 0 0 1 1
Green : 0 1 1 0
</font></pre></code>

Could have two filters giving a matching response for 4 frequencies:

<code><pre><font size=2 face='Courier'>
Red : 0 0 1 1
Green : 0 1 1 0
Freq : 1 2 3 4
</font></pre></code>

The Red filter is a High pass, the Grren filter is a band pass. Bit of a long shot but just might work !

Edited by - jeremy leach on 29/03/2007 23:00:41
 
Tri-colour LED? Is it one of those with three pins and one is common?
If it is, just run the common to + or - (what ever it is) run a resistor from the PWM pin to one of the diodes and use a transistor to invert and run the other diode :)
 
You can always cheat!
http://www.rapidonline.com/productinfo.aspx?kw=rainbow&amp;tier1=Electronic+Components&amp;tier2=Optoelectronics&amp;tier3=5mm+LEDs&amp;tier4=Rainbow+colour+cycling+5mm+LED&amp;moduleno=75160
 
picaxester : Yes, that's the style of LED. Would that combination give 'off' or just Red / Green.

Technical : An interesting LED, but not sure it's that useful for 'status display', where the colour at the time was important :-)

The easy answer would be the bi-colour LED with the two side-by-side reversed, but I have dozens of tri-colour, and no bi-colour.
 
The following circuit should give two colours, if the LED is a RGY type tricolour. It may be possible to omit the 1N914 diode and R3 if the LEDs have sufficient difference in their forward voltages.
<code><pre><font size=2 face='Courier'>PWM&gt;----WWWWW--+---------+----WWWW----+
R1 | | R3 |
| \ / |
| ___ 1N914 |
| | |
| | |
C === \ / \ /
| ___ LEDS ___
| | |
| R2 | |
0v-------------+--WWWW---+------------+ </font></pre></code>

Edited by - inglewoodpete on 30/03/2007 04:42:19
 
How about just add another 08 as an LED controller, and have it wait on &quot;serin&quot;? With the part count of some of these solutions, the cost would be the same and the 08 would use less breadboard space =)
 
This is what I came up with:

<A href='http://www.user.dccnet.com/wrigter/picaxe/IPLEDFADER1.gif' Target=_Blank>External Web Link</a>

The two anti parallel diodes turn the tri-color LED into a bicolor LED.

The rest of the circuit is an inverting half h-bridge that can be tristated.

A single PICAXE pin with PWMOUT connected to the input of this circuit can generate a 0-100% blend of the RED and GREEN colors. The 100 ohm resistor limits the LED current to 25ma.

When the PWM input is tri-stated, both LEDs turn off while the standby current drops to 500ua.

The common anode tricolor LED shown can be replaced with a common cathode tricolor LED by changing the polarity of the two diodes.

Alternatively you can use a bicolor LED without the diodes.


Edited by - wilf_nv on 30/03/2007 07:26:55
 
Hippy, slightly off topic -

I have just started experimenting splitting
a PWM signal to drive an N-ch &amp; P-ch MOSFET
above and below 50% duty.
Using 2 similar motors and rotating in the
same direction + / - 50% duty would give you
steering, this would make line tracker, solar
tracker apps possible and very simple.
All I need is an P-ch MOSFET, scrounging now ~ ;o)
 
michael 2727

that would be a motor version of this on topic circuit ?

<A href='http://www.user.dccnet.com/wrigter/picaxe/PWM1.gif' Target=_Blank>External Web Link</a>

 
Dippy

Note two legs good, four legs bad

Hippy

Note two diodes turn three legs into two legs

Edited by - wilf_nv on 30/03/2007 10:00:56
 
Wilf, your second circuit would appear to do the job, but is there an error in your first circuit? The half h-bridge appears to be non-inverting. Or I'm missing something...:)

 
Some interesting solutions there. Some are a bit too complex. The separate 08 solution as a LED diver appeals although not the cheapest - You can tell I'm more software oriented than hardware !

After sleeping on the topic, although I'd have liked a single LED and to use what I have, the easiest solution seems to be to buy a bi-colour LED or just use two separate LED's wired that same way.

All the responses have been very much appreciated. Many thanks.
 
Simple and also very attractive way is, connect one LEDchip (+resistor) directly to the 08M output. The other one will be connected, using a transistor and resistor as inverter.
By changing the pwm you will be able to fade to any color between red and green
 
<code><pre><font size=2 face='Courier'>
Like this:
------------------vcc 5 V
| |
V V
- LED1 - LED2
| |
W W
W 470E W470E
W W
| 10K |/c
&gt;()----WWWW--|b NPN
08M PWMout |\e
|
------------------ GND
</font></pre></code>

You must bracket the schematic with (code) (/code), but use square brackets. Check the Protocol link.

Edited by - acrylic on 30/03/2007 14:16:41
 
Yeah Right! Yr fast!
Thanx

BTW, schematic is for a bicolor with common anode. for common kathode, just flip vcc and gnd and use a pnp transistor....

Edited by - erik van gerven on 30/03/2007 14:19:40
 
On the filter idea, I think this could work...

<code><pre><font size=2 face='Courier'>

PWMOut ||
-&gt;----o----------||----.
| || |
| C1 .-.
| | | High-Pass Filter
| R1| |
| '-'
| |
| |
| V
| - Red
| |
| ---------o------------ Gnd
|
|
|
| ___
-------|___|---o------.
R2 | | Low-Pass Filter
--- V Green
C2 --- -
| |
----------o------o----- Gnd

</font></pre></code>

Assuming using an 08M ....

When DC output (High): Green is on, Red is off

When PWM output with frequency above the cut-off for the high-pass and below the cut-off for the low-pass: Both Red and Green on.

When PWM output with frequency above the cut-off for the high-pass and above the cut-off for the low-pass: Red on, Green off.

When the pin is made an input: Red and Green off.


Would need to experiment with values. Not guaranteeing it would work , but think so.
 
Jeremy... in theory it will but you need 2 diodes antiparallel with the LEDs for it to work.
You will loose a lot of power dealing analog on digital though...
I'd think mine is better :)
 
Now it will :) As soon a pwm is fed to the circuit C and R will open the upper transistor.
<code><pre><font size=2 face='Courier'>
------------------vcc 5 V
|
C |/c
-||--o-WWWW-|b
| W |\e
| W |
| W
| -o--------
| | |
| V V
| - LED1 - LED2
| | |
| W W
| W 470E W470E
| W W
| | 10K |/c
&gt;o-----WWWW--|b NPN
08M PWMout |\e
|
------------------ GND
</font></pre></code>


Edited by - erik van gerven on 30/03/2007 14:59:06
 
Jeremy, that was the simplistic ( just two extra C's ) approach I was looking for, although I'd initially thought of a high-pass and a higher-pass filter.

The frequency could be varied to alternate between the two to get them both apparently on together, but it might be less overhead to take a low-pass output and diode feed that to both LED's.
 
Back
Top