| FORUM

FEDEVEL
Platform forum

USE DISCOUNT CODE
EXPERT30
TO SAVE $30 USD

RGB LED Decoupling capacitor Lesson 6

lealoureiro , 10-06-2022, 02:34 PM
Hello,

I was studying lesson 6 and I notice that is suggested/recommend to use 100n decoupling capacitor in the RGB LED, common anode.

But in my case I have common cathode RGB LED. So how I should decouple the PWM from RGB led? Use 3 capacitors connected to each color pins of RGB LED? With same value 100n?

I also read in some blog/forums that having capacitors connected directly to STM32 MCU IO pins might not be recommended, specially high values.

Regards,
Leandro
qdrives , 10-07-2022, 05:57 PM
A decoupling capacitor is placed between the supply and return (Gnd).
If you are switching the LED, then where are the supply and return?

Naturally, if you have a common anode you could place the capacitor close to the anode (supply) and reference the local Gnd. Current goes through the LED to the microcontroller. This could prevent the supply from dropping a bit when switching.

With a common cathode the microcontroller is supplying the current and it goes to Gnd to return to the MCU. The place now becomes close to the MCU as there is where the current is drawn from.
lealoureiro , 10-09-2022, 06:40 AM
Thanks for your answer.

Not sure if I understood properly, but I will try to show the schematics with what I have in mind and see if is the correct direction.

Please check the images in attachment. The 1st image is the example that Phil uses in lesson 6.
And 2nd image is the schematic I have in mind for my project. I used a connector instead of SMD RGB LED because this LED is inside of button on Front Panel of the chassis connected with 20-30cm long cables.

The LED is a Common Cathode and its part number is specified on board.

I chose the resistor to draw about 10mA on full brightness. I'm not sure if I placed the capacitors in correct way. The TIM3 CHX nets are connected directly to MCU PINs.




qdrives , 10-09-2022, 12:57 PM
As I mentioned, the decoupling capacitors are placed between supply (+3V3) and Gnd. You have placed it on the output.
You need to place the capacitors close to the MCU between +3V3 and Gnd.


Use our interactive Discord forum to reply or ask new questions.
Discord invite
Discord forum link (after invitation)

Didn't find what you were looking for?