Very basic transistor usage

First off, please excuse my ignorance as I know very little about this stuff and searching google has only helped to confuse me more. What I would like to accomplish is to drive 12 bi-color LEDs (red/blue) from two seperate inputs. I would like the red potion of the LEDs to light when there is network activity and the blue LEDs to light when there is hard drive activity. This seems simple enough, but the bi-color LED is common cathode, and judging by the readings I took, the network and hard drive LEDs toggle the cathode to turn on or off the LEDs. So, what I was thinking is that I could use a transistor to drive the anodes of the 12 LEDs, but thats about as far as I got. The specs of the LEDs are Blue: 3.2v at 20mA and Red: 2.2v at 20mA. Also, the readings I took showed the hard drive activity LED cathode swinging from 5v (off) to 0v (on) and the network LED swinging from 3.3v (off) to 0v (on). Any drawing of a suitable circuit would be greatly appreciated and any explanation of how the circuit works would be even better! Thanks for any and all help!

-Jason

Reply to
Jason Richard
Loading thread data ...

Hi, Jason. You've got two jobs here -- change both logic signals to a common

+5V/0V, and then drive the LEDs.

Here's one possible way to do this (view in fixed font or M$ Notepad):

VCC + VCC VCC VCC | + + + .-. | | | 2.2K| | | | .-. | | | | | |2.2K '-' | | | | ___ | |/ | '-' .--|___|-o-| 2N3906 >| | ___ | 2.2K |< 2N3906 |-o-|___|--. | | /| 2.2K | | | | | | .-. .-. | | 75 ohm| | | | | | | | | |120 ohm | | '-' '-' | | | | | | Blue V ~ Red V ~ | | - ~ - ~ | | | | | | | | | | '---------o--------' | | | | Netwk|\ | === | -| >O--' GND | |/ | 2/8 74HC244 | |\ | -| >O-----------------------------------------------' HD |/ created by Andy´s ASCII-Circuit v1.24.140803 Beta

formatting link

For your 12 bi-color LEDs, you'll need three 74HC244s and 24 small signal PNP transistors like the 2N3906. The HC244 is a non-inverting buffer, and each logic gate will provide a solid 5.0V output for any input significantly above

1/2Vcc (2.5V if you use a 5V supply for the ICs). For each IC, be sure to make the two enable inputs logic low (0V), or the outputs won't work at all.

Now, when the logic output goes low, it will pull current from the base of the PNP transistors through the 2.2K resistors (around 2 mA). That will turn V = I * R, or

R = V / I, so

R = 2.5V / 0.02Amps = 125 ohms

Choose 120 ohms as the nearest value. Do the same calculation for a 3.2V LED to get 75 ohms for that series resistor.

Here's the datasheet to give you the pinout for the 74HC244:

formatting link

For a 2N3906, with the pins down and the flat of the plastic TO-92 case facing you, the pinout from left to right is E-B-C.

Good luck Chris

Reply to
CFoley1064

5V -----------o----------o----------------, | | | \ \ | 10k/ 10k / | \ \ | / / | | | |e | o---/\/\/-----b| PNP | | 220 |c | | | 130 | |c o----\/\/\- RED ANODE o--------| NPN | | |e o----\/\/\- RED ANODE | | | 10k |c | o----\/\/\- RED ANODE IN -/\/\/--| NPN | | |e | '----\/\/\- etc | | | | ----------o----------o------------------------ GND created by Andy´s ASCII-Circuit v1.25.250804
formatting link

Separate but equal circuit for BLUE anodes, except you use 82 ohm resistors to limit the current through them.

I'd use 2N3904s for the NPNs, and 2N4403s for the PNPs, but just because I have them laying around. Make sure the PNP can pass at least 300mA. Its a switch, so its not dissipating much power (ie, it won't get hot)

One odd thing is that if this circuit ends up always being ON, they may be controlling the LEDs by using a high impedance for off, rather than just bringing the voltage to the Vcc rail (your measurements say they probably aren't doing this, but you never know). If so, you'll need a

10k resistor from IN to 5V as well.
--
Regards,
   Robert Monsen
Reply to
Robert Monsen

Hi Chris, Something that I don't understand. Why is there a "voltage divider" between the node of a 2.2K resistor and the transistor base? Or it just the pullup resistor because of 74HC244 ? Think that you wont get 2mA when Netwk is "1" and 244 output is "0", I think you will get less than that, right ?

Reply to
Wong

Hi, Jason. It's common practice when using a transistor as a switch to have a pulldown (NPN) or pullup (PNP) resistor from the base to the emitter to keep things well-behaved. On is really on, and off is really off. In fact, "digital transistors" are made these days which have the series resistor and pullup/pulldown from base to emitter built in, and I'll usually use one of those when using a discrete transistor as a switch. Fewer components to place, less hassle. But if you're driving the transistors from HCMOS, which has logic levels pretty much at the supply rails (unless you're driving some current), the pullups technically wouldn't be necessary. Back in days of yore you'd need these extra resistors because TTL logic levels would lead to fuzzy turn-on and turn-off states. Times have changed. Good observation.

Good luck with your project Chris

Reply to
CFoley1064

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.