During my recent adventures in FPGAs I have been driving the 7 segment LED display on the LogicStart Megawing I recently purchased for my Paplilio One FPGA board. The board contains an array of 4 common anode 7 segment display characters. Four control lines are used to enable the digits while a further 8 lines are used to drive each segment (7 segments + dp). One thing I noticed while driving these displays was that the segments seemed brighter than expected and the digits were getting rather warm.
After a bit of searching I found the schematic diagram for the LogicStart Mega Wing. There appears to be some omissions on the board. Firstly there are no current limiting resistors on each of the individual segments. These are LEDs so the current needs to be limited to avoid damaging them. I assume the FPGAs internal resistance must be limiting the current somewhat but he fact the display is over heating means its drawing way too much. Secondly there are no current limiting resistors on base of the transistors used to switch power to each character. I could use PWM signal with a suitable duty cycle to lower average current but that’s a pain. Another option would be to add current limiting resistors which means butchering the board. I already had a red seven segment display an a few BC212s in my parts bin so I set about designing my own seven segment display wing.
I decided on a forward current of 10 mA through each segment. According to the Spartan 3 datasheet it is capable of sinking 24 mA per pin so 10 mA shouldn’t be an issue. The forward voltage of the LED is 1.9V and the supply voltage is 3.3V.
Rseries = (Vcc-Vf)/If = (3.3V-1.9V)/10mA = 140R. Nearest E12 value 150R.
With all eight segments illuminated the total current would be approx 80 mA. The DC current gain of the transistor according to the data sheet is a minimum of 60. Vbe(sat) = 1.4V @ 100 mA.
Ib = Ic/hfe = 80mA/60 = 1.34 mA. Rb = Vrb/Ib = (Vcc-Vbe(sat))/Ib = (3.3V-1.4V)/1.34mA = 1418R. Nearest E12 value = 1K5.
For robustness I added a few LEDs and a couple of switches to the board.