0

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.

Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Servo Dr

by pobo123 on Sun Apr 24, 2022 1:44 pm

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 railway 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.

pobo123
 
Posts: 21
Joined: Sun Apr 24, 2022 1:32 pm

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by Franklin97355 on Sun Apr 24, 2022 2:12 pm

Can you post a link to the LEDs you are using? are you using a single LED per signal or three LEDs?

Franklin97355
 
Posts: 22742
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by adafruit_support_bill on Sun Apr 24, 2022 2:18 pm

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: 84343
Joined: Sat Feb 07, 2009 10:11 am

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by pobo123 on Sun Apr 24, 2022 2:39 pm

franklin97355 wrote:Can you post a link to the LEDs you are using? are you using a single LED per signal or three LEDs?


https://www.ebay.co.uk/itm/154080044333

pobo123
 
Posts: 21
Joined: Sun Apr 24, 2022 1:32 pm

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by pobo123 on Sun Apr 24, 2022 2:55 pm

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.


Is that the VCC pin on the PWM board and the V+ pin on the same PWM board please?

pobo123
 
Posts: 21
Joined: Sun Apr 24, 2022 1:32 pm

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by adafruit_support_bill on Sun Apr 24, 2022 3:07 pm

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: 84343
Joined: Sat Feb 07, 2009 10:11 am

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by pobo123 on Sun Apr 24, 2022 3:19 pm

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.


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.

pobo123
 
Posts: 21
Joined: Sun Apr 24, 2022 1:32 pm

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by adafruit_support_bill on Sun Apr 24, 2022 3:21 pm

There is another identical set of pins on the far end of the board.

adafruit_support_bill
 
Posts: 84343
Joined: Sat Feb 07, 2009 10:11 am

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by pobo123 on Sun Apr 24, 2022 3:35 pm

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.

pobo123
 
Posts: 21
Joined: Sun Apr 24, 2022 1:32 pm

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by adafruit_support_bill on Sun Apr 24, 2022 3:50 pm

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

adafruit_support_bill
 
Posts: 84343
Joined: Sat Feb 07, 2009 10:11 am

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by pobo123 on Sun Apr 24, 2022 4:01 pm

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


Thank you very much - your assistance has been very helpful and is much appreciated.

pobo123
 
Posts: 21
Joined: Sun Apr 24, 2022 1:32 pm

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by pobo123 on Mon Apr 25, 2022 12:09 pm

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?

pobo123
 
Posts: 21
Joined: Sun Apr 24, 2022 1:32 pm

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by adafruit_support_bill on Mon Apr 25, 2022 12:22 pm

You should use a separate resistor for each LED.

adafruit_support_bill
 
Posts: 84343
Joined: Sat Feb 07, 2009 10:11 am

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by pobo123 on Mon Apr 25, 2022 12:25 pm

adafruit_support_bill wrote:You should use a separate resistor for each LED.

got it. thanks

pobo123
 
Posts: 21
Joined: Sun Apr 24, 2022 1:32 pm

Re: Contd - RGB LEDs and Adafruit 16-Channel 12-bit PWM/Serv

by pobo123 on Fri May 20, 2022 3:26 pm

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?

pobo123
 
Posts: 21
Joined: Sun Apr 24, 2022 1:32 pm

Please be positive and constructive with your questions and comments.