Electronic – How to fix common error causing multiplexed LED segments to flash and dim

circuit-designdesignled-matrixmultiplexer

I bought an electrical engineering book and was surprised to see the following figure showing how to use a microcontroller to multiplex 4 LEDs using only 4 pins:

Microcontroller multiplexing 4 LED's with 4 MCU pins.

This seemed right, logically, but wrong electrically, because a multi-segment display using this circuit would appear terribly dim with all 8 (or 9) segments sharing just one resistor like this.

Here is a simulation of the minumum subset of the circuit that would show the problem. When both LEDs are on, they dim each other because they are sharing current, so they show at half brightness. You can see the problem below from 100ms to 110ms when both LEDs fall from 2.7mA to 1.35mA.

LTSpice simulation showing LED's at half power when both are on.

I have actually seen this with commercial products. Sports scoreboards in particular, which are both big and highly visible. When you share only one resistor across all 9 segments (including decimal point), the output is only 11% of the original brightness.

Here are how the power sources are defined for the above simulation:

LTSPice power definitions and a trace graph of them.

The V2 trace is slightly offset to make it easier to see.

========

EDIT:

This was a question I thought I knew the answer to, so you will see my answer below. I thought the book was wrong, and I was wrong. I think that I was thinking of one whole digit being on at one time. But I do see this display problem. So, what causes the kind of display anomaly which I see in the real world, that makes digits dim when all of the segments are on?

Best Answer

There's nothing wrong with the schematic, but you need to be clear how the display multiplex is working.

If you consider V3/V4 as the 'digit' select, only one of these should be high at a time. Then V1/V2 will be segment drives.

So you have a truth table as follows:

V4  V3  V2  V1 =>  D1   D2   D3   D4
0   0   x   x      off  off  off  off --- all digits off

1   0   1   1      off  off  off  off
1   0   1   0      on   off  off  off
1   0   0   1      off  off  on   off
1   0   0   0      on   off  on   off

0   1   1   1      off  off  off  off
0   1   1   0      off  on   off  off
0   1   0   1      off  off  off  on 
0   1   0   0      off  on   off  on 

1   1   x   x                         --- not allowed

In other words, when V4 is high, LEDs D1/D3 are active; V3 high, LEDs D2/D4 are active. Because V4 and V3 are never allowed to be on at the same, current only flows through one LED in the 'on' row; the other LED in the 'off' row is not forward biased.

Redraw the diagram as a 2x2 matrix, and this becomes clear:

schematic

simulate this circuit – Schematic created using CircuitLab

You would expand on this to an arbitrary row x column size as needed for your display.