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

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
adafruit_support_bill
 
Posts: 88097
Joined: Sat Feb 07, 2009 10:11 am

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

Post by adafruit_support_bill »

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

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

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

Post by pobo123 »

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?

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

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

Post by pobo123 »

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.

User avatar
adafruit_support_bill
 
Posts: 88097
Joined: Sat Feb 07, 2009 10:11 am

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

Post by adafruit_support_bill »

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.

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

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

Post by pobo123 »

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

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

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

Post by pobo123 »

And without burning out my LEDs

User avatar
adafruit_support_bill
 
Posts: 88097
Joined: Sat Feb 07, 2009 10:11 am

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

Post by adafruit_support_bill »

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.

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

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

Post by pobo123 »

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

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”