2
\$\begingroup\$

My first post here! I'm that most dangerous of EE-wannabes—a software guy with theoretical knowledge: V=IR, and transistors come in two flavours: "NPN" (1=On) and "PNP" (1=Off)

Introduction

@stevenvh almost answered my question in this beautiful answer, except that I want to gang up four 4x7 segent displays - and use two demultiplexers rather than discrete selection pins. I've repeated his diagram here:

@stevenvh's diagram

My basic values

  • 5V supply
  • Common cathode displays
  • Blue LEDs with 3.0V drop @ 20mA

My problem

My problem is that I can't get hold of 74LS238 (3-to-8 demultiplexers, decodes High), I can only get 74LS138 (3-to-8 demultiplexers, decodes Low). That is, all outputs except the decoded one are High.

That means that I need to use PNP transistors rather than NPN in his diagram, and put them in "upside down" (collector to ground).

My questions

  1. Is that all I need to change?
  2. Which PNP transistor would you recommend?
\$\endgroup\$
  • 1
    \$\begingroup\$ Would it not be easier to use a single 74ls154 (4 to 16 demux)? \$\endgroup\$ – JIm Dearden Jun 21 '16 at 14:42
  • \$\begingroup\$ You could also run the output through a set of 8 inverters to change its polarity. Or build an inverting driver with a pair of NPN transistors. \$\endgroup\$ – pjc50 Jun 21 '16 at 15:48
  • \$\begingroup\$ @JImDearden Wow! I didn't know they existed - thanks for that! (Just goes to show my age...) But it's still "decode-low", requiring PNP. Is it true that PNPs don't require base resistors? I've seen conflicting reports on the 'Net. \$\endgroup\$ – John Burger Jun 23 '16 at 9:54
  • \$\begingroup\$ As regards using a (series) base resistor, it all depends on the circuit driving them (some limit the current available, others don't). As a general rule I'd go for the default position of using a resistor unless you know for certain the base current will be limited to a safe value. BTW this has nothing to do with just PNP - it also applies equally to NPN BJTs. \$\endgroup\$ – JIm Dearden Jun 23 '16 at 11:51
  • 1
    \$\begingroup\$ You may also be interested in this little chip as well , the max7219, capable of driving 8 * 7 seg common cathode LED displays using only 3 control lines! sparkfun.com/datasheets/Components/General/… - saves I/O and a lot of soldering. You can even buy them as ready built modules - just google on popular shopping sites. \$\endgroup\$ – JIm Dearden Jun 23 '16 at 12:21
1
\$\begingroup\$

The top half of the diagram can go basically unchanged: except the resistors need to be lower to accommodate the Blue LED's different voltage.

Given a transistor drop of 0.7V, and wanting a 20mA current through the LED, figure:
5V-3V-0.7V=1.3V across the resistor, 1.3V=0.02 R, or R=65Ω.

The bottom left of the diagram would replace the bank of four resistors with both the demuxers (outputs 0-2 to A-C on both demuxers, and using output 3 as a chip-enable with ~G2A on one and G1 on the other), then put resistors on the sixteen outputs to the transistors.

The resistors could probably stay at 10kΩ. Then again, @SperoPefhany in this answer suggests that no resistor is required at all...

The bottom right of the diagram would replace the NPN transistors with PNP, with their collectors connected to ground - and there'd be sixteen of them.

Given @stevenvh recommended BC337, the PNP complement is BC327.

\$\endgroup\$
  • \$\begingroup\$ Please combine it into the question \$\endgroup\$ – Eugene Sh. Jun 21 '16 at 14:09
  • \$\begingroup\$ @EugeneSh. Umm, I thought I was supposed to put my answer as a candidate, and let others improve it or rubbish it? Are things different here? \$\endgroup\$ – John Burger Jun 21 '16 at 14:11
  • 2
    \$\begingroup\$ A definite answer will do. A potential one is questionable.. \$\endgroup\$ – Eugene Sh. Jun 21 '16 at 14:13
  • \$\begingroup\$ 'Transistor drop of 0.7V' - Are you confusing Vbe (0.6 - 0.7V) with Vce sat (0.05 - 0.2V)? \$\endgroup\$ – JIm Dearden Jun 21 '16 at 14:41
  • 1
    \$\begingroup\$ I know you want to share your hard-earned wisdom, but there's hardly a need to do so. Most users here are able to drive some LEDs without your post, and the ones who can't are usually unable to apply concepts from your answer to their circuit. I'll still upvote the question though, just to reward good intentions. \$\endgroup\$ – Dmitry Grigoryev Jun 21 '16 at 15:26

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.