Control 4 independent CC RGB LED

Hey guys,

Before starting with my project, i want to apologize if i seems to don't understand what the hell i am talking about. I am starting with electronics and Arduino, my knowlegde on those domain are pretty weak.

The base being laid, i am prototyping an IOT object to monitor plants status.

The first challenge i am encountering is this :

  • I have 4 Cathode Common RGB LED modules
  • I just bought a TLC5940 chip but, guess what, i bought it too fast and now realize it's for Anode Common LED.

I need to control each LED independently to display different color for different constant.

I've read a lot of topic about TLC5940 and CC LED but i have to confess, those topics are going too far for me and my poor knowledge.

So, i need your help to figured out if :

  • There is a way to do what i want with TLC5940 and CC LED.
  • If no, does a TLC5940 equivalent exist for CC LED ?
  • If yes, does a tutorial/project exist with this setup to help me ?

BTW, this is my RGB LED module : VMA307: MODULE RGB LED COMPATIBLE ARDUINO® (2 pcs) – Velleman – Wholesaler and developer of electronics

Thx guys,
Cya.

Your link: https://www.velleman.eu/products/view/?country=be&lang=fr&id=435528

  • Yes it can be done. You could climb a mountain in high heel shoes, but it would be better to wear boots.
  • There is probably no equivalent to the tlc chip for common cathode. Most chips which are designed to drive LEDs are "low side drivers" and their pins connect to the LED's cathodes. Its easier for chip designers to do this because of how chips are manufactured.
  • There are probably no tutorials because it is not a sensible thing to do. The sensible thing is to use common anode LEDs.

You can use 2 of these chips
MCI5891
https://www.digikey.com/product-detail/en/microchip-technology/MIC5891YN/576-1310-ND/771779
to drive the unique RGB anodes.
Turning the outputs for R, G, B will give you 8 colors - off, R, G, B, RG, RB, GB, RGB

I don't see how having the different colors helps to monitor status, but it's your project.

You might be better off with WS2812B RGB LEDs, if you want to mix the colors more.
Each output has an 8-bit PWM driver, so you shift in 3 bytes and get the mix of color that results.

You can do that with the shift register as well under software control. Look at the Elco Jacobs shift PWM library.

How many colours do you want? If only bright red, green, blue, yellow, purple, a sort of cyan and white, use a MAX7219.

Thanx for your replies guys.

CrossRoads:
I don't see how having the different colors helps to monitor status, but it's your project.

I got for 4 LED for :

  • Soil Moisture
  • Temperature
  • Ambient Humidity
  • Luminosity

Each of this constant will be monitored with threshold. So each corresponding led will have to display at least 3 colors

Red for value out of thresholds
Sort of light green if value is between thresholds
And an Orange for value is equal or almost equal with the threshold value

Khalyss:
You might be better off with WS2812B RGB LEDs, if you want to mix the colors more.
Each output has an 8-bit PWM driver, so you shift in 3 bytes and get the mix of color that results.

This could be interesting but i need LEDs to be physically independant due to my 3D printed case constraint.

Another constraint is that i need all components to be powered by the internal arduino power supply and not with an external power supply.

This could be interesting but i need LEDs to be physically independant due to my 3D printed case constraint.

You can get independent WS2812 LEDs you know.
Like here:- https://www.robotshop.com/uk/5mm-adressable-rgb-led-5pk.html

Another constraint is that i need all components to be powered by the internal arduino power supply and not with an external power supply.

What? You don't have to have an external power supply to power 4 LEDs on a strip or as separate addressable LEDs. It is simply that using strips normally involves way more than 4 LEDs requiring current that cannot be handled through a USB connection.

Alright !

I am bit confused with all those informations.

So if i resume with those Adressable LEDs i could just put them one by one on different PMW pin of my board to be able to do what i want (without external chip requirement) ?

Could be really nice ^^

( I feel your pain to explain basic things to nooby like me )

Ty again !

Khalyss:
So if i resume with those Adressable LEDs i could just put them one by one on different PMW pin of my board to be able to do what i want (without external chip requirement) ?

You would put one led on one pin, and it does not need to be a PWM pin. The second led connects to the first, the third to the second, the fourth to the third. Only one pin is needed to individually control hundreds of this type of led. Each led has a chip inside it.

An alternative type to Mike's link is APA106. These are pretty much equivalent, but may be cheaper and easier to find.

s-l500.png

s-l500.png

Thx for all your replies and help, you saved my time, my mind and probably my money ! Cheers !