Electronic – Technique to drive seven segment displays with external components

displaymicrocontroller

I'd like to ask for some advice on the circuit described below:

enter image description here

I'm building a matrix of multiplexed seven segment displays, with common anode. The ports D1-D3 and segments A-DP will be driven by I/O pins from an LPC1114 ARM microcontroller.

As I understand the datasheet specs for this part I cannot exceed 4mA of source or sink current in the standard purpose I/Os. See this question for more clearance on this.

The display datasheet says that the forward voltage of each segment of the display is about 2.10V. They will be feed with 3.3V. I want use 10mA of current in each segment (I believe it will give a nice brightness with this current).

With all this in mind, and for what I understand of electronics, I aks these questions:

1 – I cannot connect the segments A-DP directly to I/O ports since it will exceed the sink capabilities of the I/O. Is this correct?

2 – Almost all schematics I found on the web on multiplexed displays do that. I did not found anyone that deals with this problem. What suggestions do you have to make it possible to sink more current in each display segment?

3 – I thought that maybe I could sink segments A-DP to ground using a MOSFET controlled by I/Os. Is this a good idea? What do you think? Any schematics on this?

Thanks

Best Answer

1) Yes that's correct. If your GPIOs can source or sink 4mA you can't ask them to source or sink more, they probably are overcurrent protected but they won't work properly.

2) That may be because other designs use "stiffer" GPIOs that can source/sink all the current that is needed.

3) That is a great idea. You can use a mosfet or a transistor, just like you do on the high side. Why are you using a NPN bjt for the high side anyway? A p-mos or a PNP bjt would be better in my opinion.

The schematic is simple:

schematic

simulate this circuit – Schematic created using CircuitLab

Remember that when sizing the limiting resistor you should take into account Q1 saturation voltage and Mx on resistance (that's quite low actually).

Pay attention to maximum mosfet \$V_{GS}\$, 5V might be too much, and be sure that Q1 is fully saturated also when every segment is on, i.e. when its collector current 80mA. Of course its collector current rating must be high enough.

As I said you should probably use a p-mos for the high side switching, currents are low so you can find something suitable for your application. Please note that a NPN bjt might not be suitable since the micro controller output is lower than 3.3V, then you have a \$V_\gamma\$, that's another 0.7V, then the LED, then the N-MOS... If the micro output is too low your leds might not light at all.