No announcement yet.

RGB LED Decoupling capacitor Lesson 6

  • Time
  • Show
Clear All
new posts

  • RGB LED Decoupling capacitor Lesson 6


    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.

    Last edited by lealoureiro; 10-07-2022, 05:02 PM.

  • #2
    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.


    • #3
      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.


      • #4
        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.