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.

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

by adafruit_support_bill on Fri May 20, 2022 3:50 pm

You should not need any extra resistors since you can control brightness of the LEDs via PWM.

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

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

by pobo123 on Fri May 20, 2022 4:01 pm

Even using the V+ pin with the PWM and not the Ground pin? Also, my three LEDs (as I explained in an earlier post) have a common anode. Does this make any difference please - can I still get away without extra resistors?

pobo123
 
Posts: 18
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 8:12 pm

The reason I ask my last question is because I seem to be getting conflicting answers on this forum but it could be due to not explaining the setup clearly.

pobo123
 
Posts: 18
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 Fri May 20, 2022 9:28 pm

Also, my three LEDs (as I explained in an earlier post) have a common anode.

The PCA9685 is not designed for driving common anode LEDs.

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

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

by pobo123 on Fri May 20, 2022 9:35 pm

Ok. So what do I do to get around that? I am sure it is still possible.

pobo123
 
Posts: 18
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 9:37 pm

And without burning out my LEDs

pobo123
 
Posts: 18
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 Sat May 21, 2022 6:39 am

To drive a common anode LED you could connect the anode to 5v and each of the cathodes to the PWM output pin. No additional resistors should be necessary.

In your code, you will need to reverse all the logic: At 100% duty cycle, the LEDs will be off (or at least very dim). If you decrease the duty cycle, it will make them brighter.

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

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

by pobo123 on Sat May 21, 2022 9:28 am

Thank you. I will try / go with that :-)

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

Please be positive and constructive with your questions and comments.