0
\$\begingroup\$

I needed a 2 digit display for a project and simply ordered a device 1, without the proper thought. To be fair I have learned a few things about 7 segment LED displays. Unfortunately I got one which is a common anode type, rather then a common cathode, for which there seem to be plenty of drivers, like the MAX6955.

That's OK I'm not short of GPIO pins on a uC so just control the 7 segment from the uC. Be a bit of timing involved illuminating each segment one at a time but not great issue. So I set about thinking of a control circuit and started with 9 BJT NPN transistors acting as switches. That seems to work in my head, but I'm wondering about efficiency. I better add a circuit:

7 Segment display with BJT NPN

Obviously I'm missing base resistors for all 9 BJTs which will be connected via a base resistor to a uC GPIO pin.

I'm happy enough with the 7 transistors switching the segments, as they just switch to ground, like a low side switch.

However the two transistors which connect power to either of the two 7 segment displays aren't as good in my head. To switch a 7 segment digit off I have to turn on the BJT, effectively shorting the Collector to the emitter. So with the 7 segment digit disabled VCC is connected to Ground through Rc1 or Rc2 and wasting power.

I guess since I'm timing the 7 segment displays and only lighting one segment, A-G, at a time I can get rid of the 7 resistors on the cathode side of the LED segments and only have Rc1 and Rc2. But the voltage drop across an LED is 2V so with a segment connected in there's VCC - 2V drop across Rc1, or Rc2, depending on which is on. Turning off the digit by shorting Collector to emitter means there's the whole VCC dropped across Rc1, or Rc2, so there be more current drain when the digit is turned off, rather then powered.

I'm going to look for another solution, but I wondered was my thinking correct. Using the BJT as a high side switch means there's more current drain when the load, in this case an LED, is off rather then switched on. If it wasn't for that I'd go with this solution but it seems not right to me.

1 https://www.lumex.com/spec/LDD-E304NI.pdf

\$\endgroup\$
2
  • \$\begingroup\$ google: "7 segment led driver common anode". Certainly you don't want to make a SC to blank the display, use instead a PNP transistor to select the display, as answered from other user. \$\endgroup\$ Jul 21, 2021 at 21:00
  • 1
    \$\begingroup\$ how much is VCC? \$\endgroup\$ Jul 21, 2021 at 22:00

3 Answers 3

3
\$\begingroup\$

You can interface the LEDs directy on GPIO configured as open drain. Then use a PNP BJT to select the display

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
  • \$\begingroup\$ You should have a series resistor into the base of the PNP transistor to set the base current. \$\endgroup\$ Jul 21, 2021 at 23:00
6
\$\begingroup\$

Yes, this is a use case for a high-side switch, not your pull-low solution.

PNP transistors instead of NPNs should do the trick here – look for "high-side switch PNP" on this site!

\$\endgroup\$
2
  • \$\begingroup\$ Or alternatively, don't drive any of the segments when the digit is supposed to be off. \$\endgroup\$ Jul 21, 2021 at 19:49
  • 2
    \$\begingroup\$ but that would require one transistor per segment, this way they can work with 1/2 transistor per segment + 2 \$\endgroup\$ Jul 21, 2021 at 19:58
0
\$\begingroup\$

To add on to Markus' answer

Since the OP used the word "Efficency":
Depending on Vcc (if it is low), may want to look at using N-FET instead of BJT for the cathode transistors.
Also, FETs in this role can eliminate the need for gate resistors.

And finally, depending on the drive capability of the uC GPIO and max current per segment (worst case is number 8), you could drive the Anode from a GPIO.

\$\endgroup\$
2
  • \$\begingroup\$ Certainly not, as NMOSFET would require a charge pump or isolated power supply for each display. Perhaps you meant a P-MOSFET? Still, lot of added complexity compared to PNP BJT. \$\endgroup\$ Jul 21, 2021 at 21:03
  • \$\begingroup\$ @MarkoBuršič I was referring to the cathode transistors, I'll update to be more clear. \$\endgroup\$
    – Aaron
    Jul 21, 2021 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.