bi-color LED and darlington driver

Lobobo

Member
For some reasons my bi-color LED does no work with my 28X1. Is it because of darlington driver? I connected it by default diagram with a resistor on one output. Maybe ist should be done different way with darlington driver or problem is different? Thank you.
 
Last edited:

BeanieBots

Moderator
Remember, the darlington driver can only SINK current.
You won't be able to connect a bi-colour between two outputs like you could with a totempole output such as those found on a PICAXE.
 

Andrew Cowan

Senior Member
A picaxe output is connected to 0V when off, and 5V when on.

A darlington output is connected to 0V when on, and nothing when off.

A
 

westaust55

Moderator
driving Bi-colour LED's

You can connect a bicolour LED directly between two outputs, as long as you do not exceed 20mA. When one of the outputs is high and the other low, the LED will shine one colour. When you swap the high and low outputs around the LED will light in the other colour.

In this case the PICAXE is both sourcing and sinking current via the output pins.

If you want higher currents then an L293D IC is an option albeit a bit of overkill for LED's.
 

MORA99

Senior Member
You can also get bicolor leds with 3 legs, 1 for common anode(+) and 1 cathode for each color, that can be driven from various drivers that only sink current.
Might be cheaper to get a standard rgb led if you just need red and green, since they are more standard, just make sure its a common anode version.
 

Andrew Cowan

Senior Member
The three leg ones are actually known as tricolour (or tricolor if your american) LEDs.

Centre:0V...left leg:+V...right leg:0V = green
Centre:0V...left leg:0V...right leg:+V = red
Centre:0V...left leg:+V...right leg:+V = greeny red

Or anything in between.

A
 

hippy

Ex-Staff (retired)
And also known as tri-colour to some :)

It should be possible to use a bi-colour LED with Darlington drivers providing suitable pull-up R's are used ...

Code:
   +V --.-----------------.
       .|.               .|.
       | |               | |
       |_|               |_|
        |   .---|>|---.   |
        |---|   LED   |---|
        |   `---|<|---'   |
        |                 |
    __|/              __|/
      |\                |\
        |                 |
   0V --^-----------------'
 

Andrew Cowan

Senior Member
It should be possible to use a bi-colour LED with Darlington drivers providing suitable pull-up R's are used ...
Say it needs 10mA to light up, and has a voltage drop of 2.2V. 5V power supply.

A 280 ohm resistor would let the LED work, and shouldn't get too hot (disipates 0.028W)

Should be fine!

Good idea, hippy.
 

westaust55

Moderator
Say it needs 10mA to light up, and has a voltage drop of 2.2V. 5V power supply.

A 280 ohm resistor would let the LED work, and shouldn't get too hot (disipates 0.028W)
Don't forget the transistor collector to emitter volt drop - say 0.2V is transistor driven to saturation.
Even more if a darlington transistor is used

This suggests a lower resistor value but use say 270 ohms as a standard rating for conventional transistor and 150 Ohms with Darlington.

Edit:
may need a different resistor value for each direction to account for different forward volt drop of different coloured LEDs
 
Last edited:

BeanieBots

Moderator
Hippy's idea is sound and will work fine.

Andrew, you need to re-think your power calculations.
That's just for the resistor driving the LED.
The side pulled down will only drop about 1.2v due to the darlington. That's closer to 0.05W disspated (for 280R) on the "out of circuit" resistor.

Still perfectly OK but a factor of 2 out.
For a blue/green LED the drop is closer to 3.5v for the LED and 1.2v for the darlington. That's a total of 4.7v out of the 5v available. A much lower value resistor would be required and issues would arrise with power dissipation on the "other" side.
 
Top