RGB led circuit, reading values in series and remembering status

Thread Starter

akaSkyWolf

Joined May 20, 2016
4
Hi everybody,
i'm very new to the electronics world coming from a programming background, so forgive me if my vocabulary isn't on point and if i do not explain well what i want to do.

So (and i'll provide an image to clarify myself) my project is to build an Arduino driven circuit where i can control multiple RGB leds individually,
my concept is to throw data out in series, specifying to which led it has to go, and i think (emphasis on the "think") that i got this part sorted, i would do something like:
  • RRR, GGG, BBB on 3 different PWM pins
  • and HIGH on a pin exclusive to one led
the HIGH pin would then "close some switches" and let the RRR, GGG and BBB value through.
My understanding is that to "electronically close switches" you can use NPNs, having:
  • the aforementioned HIGH pin on the base
  • one of the values (for instance RRR), acting like a "battery" and one of the RGB led pins (for instance R) between the collector and the emitter
is this correct?

But then i was thinking: "what if i want to have 2 leds on at the same time?", and this is for me a "walk in the dark". Is there some kind of "memory" which can "remember" the PWM clock so that the LED can stay on without the Arduino constantly feeding the values?
I know this is a vague question, but i've been researching a lot and i'm not seeing the light at the end of the tunnel (which is funny, given that we're talking about leds), can anybody help me find the right way?

Thanks in advance.


Bare sketch of what i want to do to hopefully clarify:
elecdoubt.png
 

mcgyvr

Joined Oct 15, 2009
5,394
There are THOUSANDS of tutorials/videos,etc.. on lighting RGB leds with an Arduino..
I'm failing to see what makes your project any different.. Just google "Arduino RGB led serial" and go from there..

Most basic here..
https://www.arduino.cc/en/Tutorial/ReadASCIIString

Sounds like you just need to parse the serial string and then control each output pin based on that information.. simple..
 

Picbuster

Joined Dec 2, 2013
1,047
Use a cheap PIC's with 3 pwm modules ( or build them) and create RS485 multidrop 1/2 duplex async ports.
Each set of leds will need that chip and all connected, via rs485, to your main processor.
Give each PIC an address and build a network. This is a simple job (as you have programmers experience.)
A control message could be stx [address] [R] [G] [checksum] eot used @ 115000 b/s
R/G/B each 0-255 (one byte) checksum use polynom.
Now you are able to make them work independent from each other.
 

Thread Starter

akaSkyWolf

Joined May 20, 2016
4
Sounds like you just need to parse the serial string and then control each output pin based on that information.. simple..
Maybe i'm failing to understand what you mean, but the problem here is not lighting A led, but controlling a series of leds individually using only 3 digital PWM outputs. That i haven't found around

Use a cheap PIC's with 3 pwm modules ( or build them) and create RS485 multidrop 1/2 duplex async ports.
Each set of leds will need that chip and all connected, via rs485, to your main processor.
Give each PIC an address and build a network. This is a simple job (as you have programmers experience.)
A control message could be stx [address] [R] [G] [checksum] eot used @ 115000 b/s
R/G/B each 0-255 (one byte) checksum use polynom.
Now you are able to make them work independent from each other.
Thanks for the reply, i will study and explore this option for sure.
 
Top