# How can I maintain constant brightness in dual-color (red and green), 7-segment display with different voltage drop across each color?

I am designing an interface for a dual-color, common-cathode, 7-segment display. The schematic for the display looks like this:

As you can see, the red and green LEDs are tied together at the anode. According to the datasheet, the voltage drop across the green LED is 3V@20mA and across the red LED, it is 2V@20mA.

To drive the display at 20mA through each LED, I can put a resistor at the anode of the LEDs (pins 12, 11, 10, 4, 3, 9, 6, 5) and an additional resistor at the cathode of the red LEDs (pins 14, 13, and 8) to compensate for the lower resistance of the red LEDs compared to the green LEDs. However, for each red LED that I turn on the 20mA of current will be split between them. This will make the red get dimmer for each red LED I turn on. In this case, an "8" on the display would be way too dim to read in red.

The other option I have considered is putting a network of BJTs and parallel resistors at the cathode of the red LEDs. Each time a new red LED goes on the BJT connects a new resistor in parallel, lowering the resistance at the cathode of the red LEDs and allowing more current through the LEDs of the digit. This approach seems to work; however, it adds a huge amount of new components (48 more resistors and 24 more BJTs) and complexity. I would like to keep the number of components as small and simple as possible. I am looking for a simpler and more compact solution.

• PWM, pulse-width modulation, will allow you to "dim" the LEDs on demand. Commented Apr 26, 2023 at 22:11
• I'm not looking to dim the LEDs on demand instead, I am trying to keep the red LEDs from dimming each time an additional red LED is turned on. Commented Apr 26, 2023 at 22:33
• Yes, so put the resistors in the anodes so that brightness is independent of the number of LEDs lit. Balance the green/red brightness by PWM. Commented Apr 26, 2023 at 22:49
• I see, however in simulation the current through the green LED is just a tiny fraction of the current through the red LED when they are connected in parallel. If I used PWM I would have to dim the red LED to nearly completely off to get them to match. The display will also be used outside so it needs to be as bright as possible. Commented Apr 26, 2023 at 23:42

simulate this circuit – Schematic created using CircuitLab

Here I am controlling the voltage that appears at the red LED cathodes, to offset any difference in $$\V_F\$$ between the two colours of LED. By adjusting V1 you can balance the current in the two.

The only thing that you need is a stable voltage source V1 that is able to sink the combined current of all 8 red LEDs in a single digit, without changing its voltage too much.

Here are a couple of approaches you could try:

simulate this circuit

These are both linear voltage regulator circuits able to sink current. The left design uses a commercial low dropout negative regulator. You can't use a normal positive regulator, which can only source current.

On the right is a DIY regulator, since it's more likely you have an op-amp (output and input range must include 0V), and a transistor handy.

You could also try just diodes, or diode-connected transistors to develop some voltage drop, but regulation will be terrible, as current could range from 0 to 160mA. The easiest solution I can think of, would be this next design, where regulation isn't great, but may be good enough:

simulate this circuit

You DO realize that this is a MULTIPLEX display, right?
This means that at any given moment, ONLY ONE digit is on, and the corresponding segments for it at the same time.
The next moment, another digit is on, as well ITS OWN corresponding set of segments.
That means that you shouldn't have the current division problem you have mentioned IF you know what you're doing and are properly driving the display.

What you need to do is:

1. place a resistor for each segment (A, B, C, D, E, F, G, DP, that is pins 12, 11, 10, 4, 3, 9, 6 and 5);
2. calculate it for GREEN LED (for about 3V);
3. on the cathode ends, for each digit, place a rectifier diode which has about 1V forward voltage drop at currents from 20mA to 160mA - you could also use two Schottky diodes in series to achieve the 1V drop.

The idea is that a diode is a nonlinear element, unlike a resistor, and will have a much smaller voltage drop change for the range of currents when one or all segments are on.

That should give you almost equal brightness on all segments and digits.

According to the datasheet, the voltage drop across the green LED is 3V@20mA and across the red LED, it is 2V@20mA.

The Vf (voltage drop) for the green LED seems a bit high. Anyway, adding one standard silicon rectifier diode, such as a 1N4002, in series with each red LED will bring the red/diode total Vf much closer to the green Vf. Not perfect, but the brightness matching now might be good enough.

You could reduce the number of added diodes by using only three, one each for the pins 8, 13, and 14. This will have the same effect of adding an additional Vf in series with the red LEDs, but the value of the diode Vf will change slightly with the number of segments that are on in each display. This is because the current through the added diodes will vary from 40 mA to 160 mA depending on the number of segments.

• I, unfortunately, cannot add a resistor in series with each red LED because I only have access to the common cathode pins. I'll try adding a diode at the red LEDs common cathode and hopefully, the Vf won't change too much. Commented Apr 27, 2023 at 23:03

Using a resistor on the common cathode ia not a good idea as you already saw it will cause the brightness to vary based on how many digits are on.

Drive the display with a constant current display driver chip. There is no need to re-invent what different display driver chips can already do for you.

• Do you know of any display drivers that would work with this type of display? I've considered the MAX7219 but it won't do anything to help my problem with uneven current. Commented Apr 28, 2023 at 0:40
• I can't suggest a specific product. Even if MAX7129 can't help, similar chips that can be used to drive bicolor LED displays do exist. Commented Apr 28, 2023 at 4:05

Use PWM as suggested. At any one time, one common cathode should be driven low and any number from 0 to 8 anodes are driven low with series resistors on each. So you need 6 low side drivers (with NO resistor) (for example, some N-channel MOSFETs or NPN BJTs), only one will be turned on at once, and 8 high side drivers, each with a series resistor.

Now you have a choice. If the whole display will only be all red or all green, simply drive the 1, then 2, then 7 pins low and the segments as required or drive the 14, 13, 8 pins similarly. To have the option of any segment off, red, green or yellow, drive each common cathode sequentially (could be 1,14, 2,13, 7, 8).

You need to do this fairly fast, a few hundred Hz or more, to avoid visible flicker.

That will result in one being brighter than the other. There's one other detail. You should turn the segments off a few microseconds before advancing the digit drive. That prevents ghosting (dim images of the previously scanned digit in the next).

To dim the brighter of the two colors to equalize the brightness, insert additional 'off' time. Keep in mind the voltage drop is only one factor, the brightness of the LED dice at a given current may be quite different. With time you compensate in a trimmable manner for both factors.

If you are driving all 6 common cathode pins and you want 5mA average per segment the cathode drivers will need to sink 240mA each with a 17% duty cycle and the segment drivers will have to source 30mA each with 100% duty cycle to handle the worst case (8.8.8. yellow). 240mA will also be the worst-case total draw of the display (not including the current the drivers themselves may draw).

This is all very easy with an interrupt routine and a timer.

• There are also two-terminal current regulators in the same packages as resistors. Commented Apr 27, 2023 at 4:58
• I think that you might be mixed up on the anodes and cathodes because there are 8 anodes and 6 cathodes. The schematic is upside down for some reason. I don't think a current regulator would work because I can only access the common cathode and the current in the common cathode will change depending on how many segments are turned on the in digit that is currently being multiplexed. Commented Apr 27, 2023 at 23:00
• Thanks, edited to fix CC vs. CA mixup. Current regulators in each segment sourcing driver rather than series resistors could work, however they often require too much voltage across them to regulate in a given situation, also they are more expensive than resistors and don’t solve the intrinsic LED luminance difference issue. Commented Apr 28, 2023 at 2:39