Go Down

Topic: Multiple RGB LEDs on one Arduino (Read 314 times) previous topic - next topic

Teddy_Arduino

Sep 16, 2019, 08:26 am Last Edit: Sep 16, 2019, 08:32 am by Teddy_Arduino
Hello,

I'd like to attach 4 RGB LEDs with the ability to gradually change brightness and colour. From my understanding, I need to use the PWM ports, and there are only enough PWM ports for me to attach 2 RGB LEDs.

My question is, can I, somehow, attach 2 more without getting a second Arduino? and if so, how?

Thanks.

(Here's an image in case my question is unclear)

https://imgur.com/ePE1JKs


Why not use RGB leds with a build-in controller, that way you could control 100's of leds from a single output pin.
Types to look for: WS2812B or APA106 (There are many more types).


Teddy_Arduino

Why not use RGB leds with a build-in controller, that way you could control 100's of leds from a single output pin.
Types to look for: WS2812B or APA106 (There are many more types).


Thanks for the suggestion. However, I'm not simply looking to make more LEDs light up; I'm trying to make 4, independent, non-connected light sources that can change in colour and brightness.

To put it in practical terms, I want to put each of the four LEDs in a paper lantern, which will be moving at different places on my installation.

The look for a PCA9685 module, it has 16 independent PWM channels and you can connect multiple modules to a Arduino. It might be sold as a servo controller, but the chip is designed for LED driving.

noiasca

To put it in practical terms, I want to put each of the four LEDs in a paper lantern, which will be moving at different places on my installation.
again: "WS2812B or APA106 (There are many more types)"
--> you can controll each WS2812B or APA106 LED individually.
If you can't find information with Google, let us know.

What will be the maximum distance between the central Arduino and the lanterns?
DE: Wie man Fragen postet:
1. was hat man (Sketch und Hardware)
2. was SOLL es machen
3. was macht es: IST (Fehlverhalten, Fehlermeldungen, Serial.Output ...)
4. Eine Frage stellen bzw. erklären was man erwartet

pert

Inferior to the other solutions presented as far as performance goes, but the other option is to use software PWM to get a PWM signal on any pin on your Arduino. There is a very nice library for doing this on the AVR-based Arduinos (e.g., Uno, Nano. Pro Mini, Leonardo):
https://github.com/per1234/PalatisSoftPWM

Go Up