driving an LED with a 7406 question

Hello, I have a question about driving an LED with a 7406. Basically I have an MCU going into a 7406 inverter going into an LED going to a resistor R and that going to a 5 V power supply. All in series, and I'm trying to find the value for R that would make this thing work.... here's a sketch of what I'm talking about (this is my first time skecthing on notepad)

o 5 Volts | | | / \\ R / \\ | | __ \\/ LED MV5353 --- ------- | | | | | | |\\ | | | | \\ | | MCU |-----------| \\-----------------| | | | / | | | / | | |/ | | ------- 7406

This is how I began to tackle this problem: for MCU output = high I looked on the spec sheet for the LED it said that the LED uses a continuous forward current of 20 mA at a voltage drop of 3 Volts. Then I went to the 7406 specs sheetand looked up IOL = 40 mA. So I think to myself.... great, it can sink 40mA and I only need 20mA. so R = (5-3)/20mA = 100 Ohms.... now I just have to check R with MCU out = low....

I start to get stuck here, cause I begin to think.... should I include VOL as a voltage drop when finding R? shold R = (5-3-VOL)/20mA ? Cause I'm thinking VOL is the voltage drop for the 7406.... but I look on the spec sheet and there's 2 values for VOL = 0.7....

so R = (5-3-0.7)/20mA = 65 Ohms

so.... when MCU output = low.... I'm not sure what to do here.... I look up VOH.... VOH = 30 Volts.... whoa! hmmm..... I look up IOH, IOH = 0.25 mA....... and then i think, i've got 25mA going towards that LED, but wait.... it's going the wrong way, the LED will stop it... but I wonder how much current the LED can stop?

at this point I'm totally confused and am not sure if I'm looking at things the right way anymore, the VOH,IOH,IOL,IOH stuff is confusing to me..... can anyone tell me if I'm on the right track?

thank you Joshua

so for MCU = low: I guess I need to find IOH? That's IOH = 0.25 mA.... I'm not sure what to do next, should I look up VOH

Reply to
panfilero
Loading thread data ...

Your 7406 has an open collector output so its output is a transistor... with the emitter grounded, the base going into the guts of the IC and its collector connected to the output pin.

It can only sink current, not source it.

The transistor has a maximum rating of 30V when off so you could, with an appropriate limiting resistor connect your LED to 30V. You could connect a number of LEDs in series along with an appropriate resistor and light them all from one output.

The IOH of 0.25mA is probably the maximum specified 'leakage' current that the transistor will sink when it is off with 30V applied to it. It's still sinking it so it won't hurt your LED.

[I'm guessing, I haven't read the dirty sheet]

DNA

Reply to
Genome

It's not that (5V-3V)/R = 20mA. You need to account for the 0.7V drop across the output transistor in the 7406. So it should be (5V-3V-0.7V)/R=20mA Otherwise it is fine.

Aside, if the MCU can directly drive an LED, why use a 7406. Most MCUs these days can. Tie the anode of the LED to Vcc=5V and the cathode to the MCU pin. If needed, throw a 100ohm resistor in series. The cathode should be tied to the MCU because most MCUs can sink more current than they can source.

--- Anirban

Reply to
Anirban

I'm confused about this part, if the MCU = Low, then my output of the

7406 is high..... does this mean that IOH = 25 mA is coming out of the 7406 and headed towards the LED? and what is the VOH = 30 V about? That seems really high? I thought I could treat the VOH like a voltage drop inside the 7406, (like i did for the VOL = 0.7 V part) but.... I guess I ignore the 30 V, cause there's no where for that to be coming from.... so, why is the LED off now? I don't understand how the LED is off, there's still that 5 Volts and that resistor.... aren't they pushing a current through the LED? does the lead from the LED now connect to another reistance and voltage source equivalent thing inside the 7406?

thanks confused.

Reply to
panfilero

What on earth are you using a 7406 for ?

Graham

Reply to
Eeyore

Yes, it's an inverting buffer.

No. In any case, the LED would be the wrong way round for that to work, if it was the case, which it isn't.

The maximum voltage the open collector output can withstand.

formatting link

It seems your confusion relates to not understanding what the data sheet's telling you. And some problems understanding basic electricity and how circuits work too !

Graham

Reply to
Eeyore

That is the right approach, although Vol probably will depend on the actual current.

One thing to note is that 20 mA will be very bright, brighter than what is typically needed for an indicator. The best answer is probably to try different values. You are in the right ball park.

Assuming the driver is powered by 5 V, the output will simply go to that voltage. Since the other side of the LED is 5 V, there will be no output current.

Not needed. With no significant potential difference the current will be insignificant.

--
Thad
Reply to
Thad Smith

ok, thanks that does clear it up quite a bit... i was confused as how we treat the VOL as a voltage drop but not the VOH.... what if I were to remove the LED and put a transistor there in it's place with a load in the emitter going to ground and the collector going to a 5 Volt source.... like this:

o 5 Volts | | | / \\ R / \\ | o 5 Volts | | | | ________ | | | | | ----| | | |\\ | / | | | \\ | |/ | MCU |-----------| \\---------|---------| | | | / |\\ | | | / \\ | | |/ \\/ | | | ------- 7406 | | ------- | | | | | Load | | | | | ------- | | --- \\\\\\

If my VBE = 1 [V].... and I needed 750 mA to get my load to turn on, and the load was small, like 4 Ohms.....could I do this? If I try to figure it out like the LED one, then my 7406 has a voltage drop of 0.7 Volts. but that's in parallel now wtih the 1 V from the VBE drop and the VLoad = (4)(.750) = 3 V drop from the load.... if my transistor has a gain of hfe = 40, and the 7406 sinks IOL = 40 mA, then do I need my base current to be..... IB = hfe*IC + 40mA ? that way the 40mA will get sunk but the rest will excape in order to turn on my transistor and turn on my load? I think this is correct, but then I don't know what voltages to use in order to figure out what size resistor R I would need to do this?

I don't know whether to use the VBE and VLoad.... or the VOL from the

7406?
Reply to
panfilero

--
Read the fucking thread, why don\'tcha?
Reply to
John Fields

There is nothing in the original post to indicate a reason for its use thank you very much Mr Allegedly Polite !

Does anyone even still make a standard TTL 7406 ? It seems unlikely to me.

Graham

Reply to
Eeyore

--
Geez, I thought from his post (which included a diagram, BTW) that
he was using it as a low side LED driver and wanted some help in
figuring out the value of the current limiting resistor.
Reply to
John Fields

Thank you JF. I appreciates everyones concern over the components I'm using, but I'm not looking for a more efficient design to this simple problem, I was looking for some understanding to these kind of simple circuits. This problem is just for helping myself understand things not for efficiency or pratical use in any specific application.

Thank you

Reply to
panfilero

you

Well ? So ?

Do you never think to offer advice about component selection ?

Graham

Reply to
Eeyore

When the 7406 is off, can I treat it as a 0.7 Voltage load with 40 mA running through it to ground?

Reply to
panfilero

you

Yes

formatting link

Reply to
tsest(1)

wait.... it's going the wrong way, theLEDwill stop it...

The first thing I sometimes do, is take the LED and see how much current it needs to be bright. I'm not talking about lighting up the room either. I usually use between 5 an 10 ma. max for indicators. Back in the old days you needed the current for a little brightness.

greg

Reply to
g

It can be hard enough to explain this sort of design in person, much less by group postings, but I'll give it a try.

The 7406 or any other switching device has two sets of ratings; one for input and one for output. The input specs tell you what is required to drive the inputs to a valid state. The output specs tell you what sort of load and voltage can be driven by the output.

The LED requires about 20 mA at about 2.2 volts to drive it. If you use a 5 volt supply and use a 74LS06 as the control (I can't find a data sheet on the 7406) you need to subtract the LED voltage and the

74LS06 output voltage (VOL@24 mA = 0.4V) from the power supply to find the voltage on the current limiting resistor. 5 - 2.2 -0.4 = 2.1V. At 20 mA this will give you 2.4V / 20 mA = 120 ohms.

Since this is an open collector device, it will not source any current to the LED, so you don't need to worry about that. The IOH of this device is not given because it does not drive current when the output is high. Regardless, IOH and IOL are maximum values or conditions for measuring VOL and VOH. The outputs of digital devices are just transistors connected to ground and power; they are not current sources. They provide a voltage and the current drawn from the output is determined by the load.

In the above example I only needed to know the current into the 74LS06 output because there is some resistance in the transistor connection to ground so that the output voltage of the 74LS06 depends somewhat on the current flowing. At 24 mA the output voltage is 0.4 V, at 48 mA the output voltage is 0.5 V. You can see this is not a large difference. Even a microAmps of current, the output voltage will likely be around 0.2 volts. For most circuits you can estimate the output low voltage to be about 0.4 volts for TTL type devices. CMOS devices are much more like resistors on the output so the resulting voltage varies directly with the current.

Does that help?

Reply to
rickman

One approach is to try the larger resistor value (100 ohms) and measure the current. If you're wrong, then you'll get too little current. But it WON'T fry any of the components, and you can then get a better idea what the correct resistor should be.

Sometimes a little experimenting helps more with learning electronics than spending a lot of time getting the calculation correct.

Mark

p.s. to measure the current, I'd measure the resistance before putting the resistor into the circuit, and then measure the voltage drop across the resistor while running the LED. But that's just my preference, I tend to avoid using ammeters directly.

Reply to
redbelly

--- Depends on what you mean by "off".

It might be simpler to look at the 7406 as a single transistor with its base pulled up to Vcc and nothing connected to its collector. (View in Courier)

Vcc | [10K] | C | ---| >O---+ | /

Assuming that you want to drive a 20 mA LED with a Vf of 2.2V,

Looking at the 7406 data sheet shows that when it's sinking 16mA worst case Vol will be 0.4V and when it's sinking 40mA worst case Vol will be 0.7V. If we assume the change is linear, then we have a

24mA change in current causing a 300mV change in voltage, which is 12.5mV/mA.

So, for 20mA, worst case Vol would be 0.45V.

For Rs,

Vcc - (Vled + Vol) 5V - 2.65V R = -------------------- = ------------- = 117.5 ohms Iled 0.02A

The closest standard 5% value is 120 ohms, which would be fine, and the power it would need to dissipate with 20mA through it would be:

P = IE = 0.02A * 2.35V = 0.047 watts.

So since there's a little less than 20 mA through it, a standard 1/4 watt resistor would be fine.

So, here's what you need:

5V | [120] | |A 7406 [LED] | \\ | MCU I/O>---| >O---+ | /

And the LED will light when the MCU I/O goes high or goes high-Z.

-- JF

Reply to
John Fields

"panfilero" schreef in bericht news: snipped-for-privacy@p10g2000cwp.googlegroups.com...

So far you're on the right way. The value of VOL depends on the current. At

16mA the VOL is 0.4V as a maximum. At 40mA the VOL is 0.7V as a maximum. So it's safe to use VOLmax=0.4V, so

R = (5-3-0.4)/20 = 80E

use 82E as the nearest standard value. In pratical situations 100E to 470E is used depending on the amount of light required.

You're off track now. The specified VOH is the maximum voltage the output can handle without being damaged. You're using only 5V.

The specified IOH is the maximum current that will leak into the SN7406 output when VOH=30V. As your VOH is only 5V the IOH will be neglectable.

When MCU low, the SN7406 output will be high. They are inverters remember? When you look at the schematic on the datasheet, it means that the basis of the outputtransistor will be low. So no current will flow from collector to emitter except from the leakage mentioned earlier. This leakage will not be enough the light the LED, so it's off.

When the MCU is high, the voltage on the basis of the SN7406 output transistor will rise. The current that flows into the basis now will drive the transistor into saturation. The current through collector and emitter will be maximum, only limited by the load between collector and supply voltage. According to the specifications the output voltage will sink to or below 0.4V. No need to say the LED will be on.

petrus bitbyter

Reply to
petrus bitbyter

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.