I "inherited" a small project from a person I don't know, and I'm navigating my way through it. It's a small gadget featuring a 7-segment LED display. I hear the device's original designer is more of a hardware guy (the very messy, copy-pasta code hints in the same direction). Thus I'm inclined to think his schematic is something I can learn from, but there are a few things in there which I find puzzling — one of which is this:


simulate this circuit – Schematic created using CircuitLab

Which looks simple enough:

  • a single MCU pin cannot drive 7 LEDs directly, so you need a switch transistor;
  • you can use either a PNP or PMOS (proper high-side switches), or NPN used as an emitter follower (the anodes only "see" ~4.3V, which is acceptable). He chose the latter, probably because he had a bucketful of NPNs laying around;
  • "it's a bipolar transistor, it needs a base resistor"


The 10k resistors seem to be redundant, you can replace them by wires and get a pure emitter follower. Can they serve any reasonable purpose in this situation?

  • \$\begingroup\$ Not essential, as Spehro says. One thing they MIGHT do is protect the transistor in the event of emitter to GND shorts; which through a LED display is not a serious concern anyway. \$\endgroup\$ – user_1818839 Feb 5 '20 at 22:39
  • \$\begingroup\$ A side topic - are you sure that the MCU I/O is 5V? Most are lower. You show Vdd = 5V, but this could be a module with an LDO dropping the MCU voltage to 3.3V. \$\endgroup\$ – Mattman944 Feb 6 '20 at 0:19
  • 1
    \$\begingroup\$ Normally PNP transistors would be used in this configuration (Collector and emitter reversed of course). They would provide better drive to the LEDs. \$\endgroup\$ – Kevin White Feb 6 '20 at 5:09
  • \$\begingroup\$ @Mattman944, it is 5V, it's an old PIC. \$\endgroup\$ – anrieff Feb 6 '20 at 6:50

They prevent the transistors from (potentially) oscillating in the VHF frequency band, but you can replace them with 100 ohm resistors and get just the same benefit and less voltage drop.

Chances are with a direct connection they won't oscillate anyway because the internal resistance of the MCU output is high enough.

  • \$\begingroup\$ Very cool, I haven't thought of that. Then I guess it's wise to test with 0-ohms on some of the old boards, to verify your intuition about the MCU pin resistance being high enough to prevent the oscillation. \$\endgroup\$ – anrieff Feb 5 '20 at 22:49
  • \$\begingroup\$ Better to measure or estimate the resistance and test with a fraction of that to Vcc. Maybe 24 ohms. \$\endgroup\$ – Spehro Pefhany Feb 5 '20 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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