Hey guys,
I am using a common anode RGB led, I have +5 volts going in to the common anode, then I have each cathode going through a 1K resister then to a GPIO pin of a 3.3V microcontroller. Ground is pulsed on the GPIOs to create a PWM signal to get the desired colors, and it works great.... with the exception that the red channel has a very dim glow when completely off (off being a high on the GPIO of 3.3V)
I believe it has to do with the voltage drop of the red led being different than the blue and green? When the red is off, there is 5V on the anode, 1K resistor, then 3.3V on the cathode.
You might wonder why I don't just use 3.3V and lower resistor values? This is because an old design is being retrofitted with a different LED. Another solution would be for me to have the GPIO drive a transistor/mosfet, which would pulse the ground for the LEDs, but this is not an easy change at the moment.
Something I tried was making the GPIO an input when I want it off completely, and this does work, but this is a hack and will only solve the problem if I want it off 100%.
I also noticed that not all brands of RGB LEDs do this, only certain ones...
Is there an easy solution to this? Is it as easy as just using a different resistor value for the red channel?
Here is the voltage drops for the LEDs I'm using:
I am using a common anode RGB led, I have +5 volts going in to the common anode, then I have each cathode going through a 1K resister then to a GPIO pin of a 3.3V microcontroller. Ground is pulsed on the GPIOs to create a PWM signal to get the desired colors, and it works great.... with the exception that the red channel has a very dim glow when completely off (off being a high on the GPIO of 3.3V)
I believe it has to do with the voltage drop of the red led being different than the blue and green? When the red is off, there is 5V on the anode, 1K resistor, then 3.3V on the cathode.
You might wonder why I don't just use 3.3V and lower resistor values? This is because an old design is being retrofitted with a different LED. Another solution would be for me to have the GPIO drive a transistor/mosfet, which would pulse the ground for the LEDs, but this is not an easy change at the moment.
Something I tried was making the GPIO an input when I want it off completely, and this does work, but this is a hack and will only solve the problem if I want it off 100%.
I also noticed that not all brands of RGB LEDs do this, only certain ones...
Is there an easy solution to this? Is it as easy as just using a different resistor value for the red channel?
Here is the voltage drops for the LEDs I'm using: