Multi-colour using RGB LED

This 8th article in the series of “Do It Yourself: Electronics”, discusses the multi colour generation using RGB LED.

<< Previous Article

Festival season was approaching fast. This time Pugs wanted to create some fancy lighting for the same to be decorated in his hostel room. First thought was to create some colourful lighting banner. Next thought was to possibly use the electronics, he has been learning. In electronics, lighting is synonymous to LEDs. But, then we are limited by colours – red, green, yellow, and blue – that is what Pugs used to think, before he explored further into LEDs. Upon exploration, he found out an orange LED, but more interestingly an RGB LED, where R stands for Red, G for Green, B for Blue. Yes, a single LED with three colours in it.

With his desire to create multi-colour lighting, that looked promising, as he has learnt from his computer graphics studies that with RGB, one can generate any colour. But that was computers, and this is electronics. So, what? Colours are colours. With all these thoughts ringing in his head, he walked towards his batch-mate & newly found electronics friend Vishal’s room.

Once at Vishal’s door, he knocked it. But no response. So, he pushed it, and it opened wide. Vishal was in his Krishna prayers. So, Pugs got inside and sat on the cot, waiting for Vishal to finish his prayers.

“What’s up Pugs? What brings you here?”, asked Vishal, after completing his prayers.

“Vishu! I can generate various colours using combination of RGB in computer graphics. Can I do similar things with RGB LEDs?”, queried Pugs.

“Yes! Of course, you can?”

“But how? In graphics, I have numbers from 0 to 255 for each of the colours, and I use different value combinations for different colours. How do I give that value in LEDs?”

“Think beyond numbers – what do they control?”

“Hmmm – intensity.”

“Exactly. So, here you control the intensity of the LED, by passing different currents through the LED.”

“Okay. But these RGB LEDs look so weird. I can do this for a single LED. But these RGB LEDs – some have 6 legs, but mostly have only 4 legs.”

“O! I see what’s your confusion. One with 6 legs looks fine to you, right?”

“Yes. 3 coloured LEDs in one. Each LED with 2 legs, and hence total of 6 legs.”

“But most of the time you don’t need all legs separate for them. You may control their intensity from the anode (+ve side), and the cathode (-ve side) could be common. Or, vice versa. And, in that case they would just need 4 legs.”

“Okay. Then, why do we have 6 leg LEDs.”

“Now, you are asking the other way round question – you can’t stop your questions.”

“That’s the way we learn, right?”

“Okay. Okay. Stop your gyaan. For example, if you want to connect the LEDs in series, it may not be possible with common cathode or common anode RGB LEDs.”

“Now, last question – how do I control the current through LEDs with the common terminal, say common cathode?”

“Same way, using variable resistors like potentiometers (pots) – just connect three – one with each colour’s anode.”

Concluding with thanks, Pugs rushes to his room to create a simple circuit to generate multi colours using his RGB LED(s). Some of the basis, which Pugs wants to try for his colour generation are as follows:

  • With Red + Green intensities – Brown, Orange, Yellow
  • With Green + Blue intensities – Cyan, Shades of Blue
  • With Blue + Red intensities – Pink, Magenta
  • With Red + Green + Blue intensities – White, Shades of Grey

What do you think? Will he be able to generate all these colours?

Next Article >>

Anil Kumar Pugalia (123 Posts)

The author is a hobbyist in open source hardware and software, with a passion for mathematics, and philosopher in thoughts. A gold medallist from the Indian Institute of Science, Linux, mathematics and knowledge sharing are few of his passions. He experiments with Linux and embedded systems to share his learnings through his weekend workshops. Learn more about him and his experiments at https://sysplay.in.


   Send article as PDF   

2 thoughts on “Multi-colour using RGB LED

  1. Pingback: PC based Oscilloscope | Playing with Systems

  2. Pingback: Micro-controller Programming on a Bread Board | Playing with Systems

Leave a Reply

Your email address will not be published. Required fields are marked *