2982Views5Replies

# How to make the voltage of the RGB LED's green and blue higher in this circuit? Answered

So I have two 5mm RGB LEDs. In my schematic diagram, RGB LED 1 is common cathode, while RGB LED 2 is common anode. My LEDs config is this:

Forward Voltage: 2.2V (R), 3.2v (G), 3.2v (B)

Forward Current: 20mA

I think it's the same for both? Of course when I send data from the PIC pins, one will turn on and the other will turn off. I used the resistors for current limiter. Please refer to the photos, when RGB1 is on (RGB2 off) the voltage are ok. 2.2v, 3,2v,3.2v RGB respectively. But when RGB2 is on (RGB1 off) the readings are 2.7v, 1.7v, 1.7v. It lights up in proteus. In hardware, the GB of LED2 will be dimmer right? or is this just ok? How do I increase the voltage here without affecting the current much. The current readings are also in the photos by the way, 16mA is ok I think.

I'm not very good with circuits so can somebody please give me the computation for increasing the voltage? Thank you. I'm trying to understand how it works. Any suggestions, criticism is ok LOL. Thaks! ^^

Tags:

## Discussions

Could you swap out your resistors with pots? Then you could manually adjust until you have the brightness you want.

Aw. And here I was planning to use 4cathodes and 4 anodes. Paired, in order to avoid using the transistor cause I really couldn 't comprehend the computations needed for transistors. If i use 8 anodes then. With a ULN2803 to drive it. Do I really still need to connect resistors to each color legs? I tried simulating it with the resistors, it lit very dimly.

Sorry, I'm a total novice. I'm studying programming on my own and circuits are needed for that and im noob when it comes to that.

You are limited by the voltage the PIC can handle.

Yes, you can change the resistor values to adjust the perceived LED intensity

as long as you don't exceed the pic pin current.

A smaller resistance value will allow more current and brighter LED.

THE MATH IS SIMPLE

Start with 5V, subtract the (forward voltage of the LED) and subtract the (voltage lost across the PIC pin) that may give you only 2.4 volts for sizing the resistor.

Now you want 20ma....... well R = V / I = 2.4V/.020A =240/2 = 120 Ohms

Test Power = V x I =2.4 x .02 = .048 watt ..... that means any small 1/8 W resistor will do.........

.

You do realize that both high and low particularly the red LEDs will dimly light when you set the uP pin to input or high impedance..

An LED when conducting is almost a short circuit so you must restrict the current through the LED or it will over heat and burn out.

Your calculations should be as follows:

The supply voltage

The LED forward current required.

The LED forward voltage

Supply voltage - LED forward voltage will give you the voltage that will appear across the resistor.

As the same current will flow through the Resistor as flows through the LED this will be the LED forward current.

Ohms law calculates the resistor value for that voltage and current.

Volts= Current x resistance.

so: resistance = voltage/current.

NOW - Your PIC microprocessor Probably only provides up to 20 milli Amps of current per output so Your drawing a lot of current from the output by driving 2 LEDs at 20 milli Amps each. this is why the voltage appears low.

I suggest you reduce the current flow to 10 Milli amps per LED and calculate the resistor accordingly.

IF you want the LEDs to be brighter then you will have to interface them with a driver transistor.

I suggest you look through this PDF

http://www.picaxe.com/docs/picaxe_manual3.pdf

Not for your PIC BUT the principles will apply.

Each color will draw different amounts of current and will need different resistor values to optimize their light output. If the LED isn't bright enough then put in a smaller resistor. Better yet put a larger resistor on the color that is too bright.