I am planning to use this design to control the common anode of 8 LEDs, i.e: I am planning to draw about 56 mA maximum from D1.

Y0 is an output from a 74HC238.

Will this work?

EDIT: Will a configuration like this and a 74HC138 (active low outputs) work better?


Thanks in advance

  • 1
    \$\begingroup\$ Assuming the 74HC238 is also working on 3.3 V, transistor Vbe around 0.7 V: 3.3 - 0.7 V = 2.6 V. That is avery low voltage to operate a LED. So no, this is not a good solution. Replace T1 by a PNP (emitter on 3.3 V) or even better a PMOS (source at 3.3 V). Then D1 will be pulled up fully to 3.3 V. Note that for both PNP and PMOS solutions Y0 = 0 (zero, low voltage) means the LED will be ON. So that is inverted behavior to your (non inverting) solution. \$\endgroup\$ – Bimpelrekkie May 24 '17 at 21:09
  • \$\begingroup\$ Did you understand in myanswwr why it won't work? Common Anode needs a voltage source high. Your original was too lossy and latter one is wrong polarity \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 May 25 '17 at 5:04
  • \$\begingroup\$ You should show the diodes. \$\endgroup\$ – mkeith May 26 '17 at 5:34

If the Vcc voltage for the 74HC238 is 5V it might make sense to keep the resistor R18, if Vcc is 3.3V you don't need it (and it's better without it). There is enough output Z in the 74HC chip to avoid emitter follower stability issues.

I don't see any point in using a 300V transistor an a 3.3V circuit. It's more expensive than something like a 2N4401 and has much poorer performance. Gain is as follows:

enter image description here

So it could be as low as 15 or so at low temperature and 56mA (using worst case gain of 25 at 25°C/50mA and adjusting for temperature and higher current), meaning the base will be drawing 3.7mA. That would drop 3V across the 820 ohm resistor, which is obviously going to mean the LED current will be mostly determined by the transistor gain. This is not what a good design does- gain should ideally have no effect on the operation.

So, assuming your Vcc is 3.3V throughout- get rid of R18 and use a 2N4401.

Keep in mind that the transistor will still drop about 0.7V plus whatever the 74HC output drops, so hopefully your LEDs are low enough Vf that such a drop is acceptable. For reliable operation, that probably means a red LED only.

If your 74HC is running from +5 you will need the base resistor and you can saturate the transistor so all is well.

The way to do it with little drop is to use a PNP transistor (or p-channel MOSFET), but your control signal will be inverted so probably the HC238 is not what you want. If your LEDs are blue or white, especially, you're probably marginal even with that.

P.S. The 10K is probably not necessary unless you are doing something else with the digit scan signals. Unless you are worried about leakage at very high ambients and slight LED visibility in a very dark room.

| improve this answer | |
  • \$\begingroup\$ That MPSA42 was the cheapest GP transistor on the store actually :P About the LEDs, the display has 8 "segments", which may be red or green depending on the "digit" (yes, because there are some characters whose circuit is the same as for a 7seg digit but its actually just red icons) Everything will be powered from 3.3V (including the HC). I have 51R on each LED (new image attached). Thanks for the fast answer \$\endgroup\$ – João Silva May 24 '17 at 21:23
  • \$\begingroup\$ I tested on a breadboard this circuit in the worst case, which is all the red LED segments (the red ones draw more current) on at the same time and got an acceptable brightness. I was giving 3.3V directly to R18 although, cause I didnt have a 74HC238 yet in that time. \$\endgroup\$ – João Silva May 24 '17 at 21:27
  • \$\begingroup\$ Check the last EDIT if you can please, and tell me if it would be better to let the transistors saturated all the time and just switch them off when I want a digit to be active. Thanks in advance \$\endgroup\$ – João Silva May 24 '17 at 22:06
  • \$\begingroup\$ No that won't work at all- the only sourced current is through the 10K which is not nearly enough. Throw away the MPS42s (or save them for a Nixie tube project) and use 2N4403s, or similar. \$\endgroup\$ – Spehro Pefhany May 25 '17 at 1:40

Use an inverting PNP or Pch FET switch for the common anode.

MPSA42 is an extremely poor choice for DC current gain.

The purpose of a switch is to offer stable voltage with any load current variation. hFE = 40 is too low and I suggest choosing anything with >200 to 1000

the output impedance of the emitter follower is Rb/hFE so 820R/40 is 21 Ohms which in addition to Vbe drop adds 21*56mA=1.2V drop due to Rb so estimation of actual LED current becomes a problem when it depends on hFE. This is why an inverting switch is used with series Rs for each diode or whatever.

Any of these are better THT BJT NPN's or this one with https://www.digikey.com/product-detail/en/fairchild-on-semiconductor/SS9014DBU/SS9014DBU-ND/1047201

20 cents for (1) hFE=400 enter image description here

| improve this answer | |
  • \$\begingroup\$ Because this is an LED driver driven by a logic line, the transistor should be assumed to be in saturation when active, and selecting for high hfe makes no sense, as far as I can tell. \$\endgroup\$ – WhatRoughBeast May 25 '17 at 0:12
  • \$\begingroup\$ @WhatRoughBeast you ought to know me better, The question morphed and initially it was just D1 Output with an emitter follower. Which should be a Pch FET or PNP switch. the CA segments are NPN collector driven low, but if he wants to use an emitter follower then it better be a good one. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 May 25 '17 at 0:18
  • \$\begingroup\$ @TonyStewart.EEsince'75 I don't think the very first picture ever was meant as an emitter follower. Just drawn like one, with a collector resistor that is a bit of a red herring (and mostly irrelevant.) \$\endgroup\$ – jonk May 25 '17 at 2:23
  • \$\begingroup\$ image.prntscr.com/image/775a6c1160fd4a058ef37b1a4d2f9f1d.jpeg. has no collector R just 3.3V. . I edited my answer to state the obvious sol'n \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 May 25 '17 at 5:02

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.