Page 1 of 1

Driving a tri colour LED

Posted: 09 October 2018, 8:25 AM
by FFMan
I'm making a Nixie clock and temp/date display. As i don't have room for a leading minus sign for the temp display, i was thinking of having a tri-colour led that went from red (30c) to blue (0c) depending on outside temp.

I guess i can achieve this using 3 (RGB) pwm pins but it feels quite resource intensive and can this be done on zx40 which needs 2 s/w uarts already ?

Is there a better way ?

Re: Driving a tri colour LED

Posted: 09 October 2018, 10:19 AM
by dkinzer
FFMan wrote:Is there a better way ?
Which tri-color LED are you thinking of using? If you choose a common anode type you could have several different 3-resistor combinations that could each be connected to an output pin which, when set low, would create a pre-determined color.

It may be tricky to select the resistor values due to the effective network resistance - diodes in series with the resistors would isolate them.

Posted: 09 October 2018, 14:14 PM
by FFMan
that's an interesting idea - might have a play with that.

I've seen around, but not yet in the right package some I2C or SPI controlled led driver chips that do the pwm which is another option.

thanks - current battle is to learn KiCad to design the board

Posted: 01 November 2018, 0:23 AM
by kurakaira
I recommend the APA102 RGB led in a 5050 package , it has a clock and a data line , so it does not need specific timing , You can chain as many as You need and its bright .