Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Servo Dr
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- pobo123
- Posts: 21
- Joined: Sun Apr 24, 2022 1:32 pm
Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Servo Dr
Hi. I am trying to connect 15 RGY (red, yellow and green) LEDS with common anodes and have been looking at the viewtopic.php?f=22&p=170571 discussion (now closed) which is the most useful information I've managed to find so far. Basically, I would like to use an Arduino Mega and some PCA9865 boards to control 15 model BANNED signal lights. In the discussion I attached the link to, adafruit_support_bill suggests "connect the common anode lead to 5v, and connect each of the R, G & B leads to one PWM channel...". I am a newbie here, please can someone explain in more detail how to connect the anode lead to 5v. I am confused what this means and how to do it.
- Franklin97355
- Posts: 23930
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
Can you post a link to the LEDs you are using? are you using a single LED per signal or three LEDs?
- adafruit_support_bill
- Posts: 88112
- Joined: Sat Feb 07, 2009 10:11 am
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
If you are using an Arduino Mega, follow the connection instructions here: https://learn.adafruit.com/16-channel-p ... king-it-up
The PWM/Servo driver board has a row of 3-pin headers. The top row is the PWM signal. The bottom row is GND. And the center row is labeled V+. If you connect a jumper from the VCC pin to the V+ pin on the edge of the board, that will provide 5v power to the center row of pins.
The PWM/Servo driver board has a row of 3-pin headers. The top row is the PWM signal. The bottom row is GND. And the center row is labeled V+. If you connect a jumper from the VCC pin to the V+ pin on the edge of the board, that will provide 5v power to the center row of pins.
- pobo123
- Posts: 21
- Joined: Sun Apr 24, 2022 1:32 pm
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
https://www.ebay.co.uk/itm/154080044333franklin97355 wrote:Can you post a link to the LEDs you are using? are you using a single LED per signal or three LEDs?
- pobo123
- Posts: 21
- Joined: Sun Apr 24, 2022 1:32 pm
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
Is that the VCC pin on the PWM board and the V+ pin on the same PWM board please?adafruit_support_bill wrote:If you are using an Arduino Mega, follow the connection instructions here: https://learn.adafruit.com/16-channel-p ... king-it-up
The PWM/Servo driver board has a row of 3-pin headers. The top row is the PWM signal. The bottom row is GND. And the center row is labeled V+. If you connect a jumper from the VCC pin to the V+ pin on the edge of the board, that will provide 5v power to the center row of pins.
- adafruit_support_bill
- Posts: 88112
- Joined: Sat Feb 07, 2009 10:11 am
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
Yes. The VCC pin will have 5v as supplied by the Mega. If you connect that to V+, then all the V+ pins will have 5v also.
- pobo123
- Posts: 21
- Joined: Sun Apr 24, 2022 1:32 pm
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
I already have a jumper lead running from the Arduino 5V pin to the VCC pin on the PCA board. How do I add another one? Sorry if I am missing something obvious here.adafruit_support_bill wrote:Yes. The VCC pin will have 5v as supplied by the Mega. If you connect that to V+, then all the V+ pins will have 5v also.
- adafruit_support_bill
- Posts: 88112
- Joined: Sat Feb 07, 2009 10:11 am
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
There is another identical set of pins on the far end of the board.
- pobo123
- Posts: 21
- Joined: Sun Apr 24, 2022 1:32 pm
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
.adafruit_support_bill wrote:There is another identical set of pins on the far end of the board.
Ok. Great. Thank you - some progress :-)
I think I need to add some resistors before I continue and do some damage. The lights came on very bright!
Could connecting the V+ pin to the other VCC be a problem though if a need to chain PCA boards? This is what I am hoping to do next.
- adafruit_support_bill
- Posts: 88112
- Joined: Sat Feb 07, 2009 10:11 am
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
If you run out of pins, you can always splice some wires. Either the old fashioned way with solder and heat-shrink. Or with solderless 'cold-splice' wire taps.: https://www.adafruit.com/product/1494
- pobo123
- Posts: 21
- Joined: Sun Apr 24, 2022 1:32 pm
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
Thank you very much - your assistance has been very helpful and is much appreciated.adafruit_support_bill wrote:If you run out of pins, you can always splice some wires. Either the old fashioned way with solder and heat-shrink. Or with solderless 'cold-splice' wire taps.: https://www.adafruit.com/product/1494
- pobo123
- Posts: 21
- Joined: Sun Apr 24, 2022 1:32 pm
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
As I have a single common anode wire for each set of three LEDs (RYG), please does anyone know if I can use one resistor on the ground wire or do I still need resistors for each LED?
- adafruit_support_bill
- Posts: 88112
- Joined: Sat Feb 07, 2009 10:11 am
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
You should use a separate resistor for each LED.
- pobo123
- Posts: 21
- Joined: Sun Apr 24, 2022 1:32 pm
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
got it. thanksadafruit_support_bill wrote:You should use a separate resistor for each LED.
- pobo123
- Posts: 21
- Joined: Sun Apr 24, 2022 1:32 pm
Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv
Hi Guys. Me again. Still scratching my head. It was suggested that I use a resistor for each of my LEDs but when I read the documentation here:
https://learn.adafruit.com/16-channel-p ... p?view=all
It says, "First wire a LED to the board as follows. Note you don't need to use a resistor to limit current through the LED as the PCA9685 will limit the current to around 10mA:"
I am confused even after watching several electronics youtube videos explaining the calculation of resistance and ohms law!!
Please, can someone explain why I need to add resistors with my planned setup even though the PCA9685 limits the current to around 10mA?
https://learn.adafruit.com/16-channel-p ... p?view=all
It says, "First wire a LED to the board as follows. Note you don't need to use a resistor to limit current through the LED as the PCA9685 will limit the current to around 10mA:"
I am confused even after watching several electronics youtube videos explaining the calculation of resistance and ohms law!!
Please, can someone explain why I need to add resistors with my planned setup even though the PCA9685 limits the current to around 10mA?
Please be positive and constructive with your questions and comments.