EmbeddedRelated.com
Forums

driving an LED with a 7406 question

Started by panfilero February 13, 2007
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

"panfilero" <panfilero@gmail.com> wrote in message 
news:1171339256.081298.159170@p10g2000cwp.googlegroups.com...
> Hello, I have a question about driving an LED with a 7406......
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
On Feb 13, 9:00 am, "panfilero" <panfil...@gmail.com> wrote:
> 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
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
> > > 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 > > Not needed. With no significant potential difference the current will > be insignificant. >
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.
panfilero wrote:

> > 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
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.
> 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?
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.
> 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
Not needed. With no significant potential difference the current will be insignificant. -- Thad

panfilero wrote:

> Hello, I have a question about driving an LED with a 7406.
What on earth are you using a 7406 for ? Graham

panfilero wrote:

> > > > > 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 > > > > Not needed. With no significant potential difference the current will > > be insignificant. > > > > I'm confused about this part, if the MCU = Low, then my output of the > 7406 is high.....
Yes, it's an inverting buffer.
> does this mean that IOH = 25 mA is coming out of the > 7406 and headed towards the LED?
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.
> and what is the VOH = 30 V about?
The maximum voltage the open collector output can withstand. http://en.wikipedia.org/wiki/Open_collector
> 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.
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
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?


Dear friend :
It is my fortunate writing to you . you will discover this is a wealth
accumulation place.
The website of our company is http://www.china-powerseller.com
We are a big agent for Laptop
Mobile Phone\Digital Camera\CDJ\DJM\Apple Ipod\PSP\VEDEO GAMES
\Television\GPS\Telescope in CHINA .
All of our commodities is the most advanced quality but lowest price.
we also have the

safest and most
convenient transaction way to guarante the transaction arries on
normally .
looking forward to your coorporation and cause all of us both to
profit.
you can contact us by Email:china.seller#hotmail.com
MSN: china.seller#hotmail.com
best wishes!
your sincerely

http://www.china-powerseller.com
MSN/Email: china.seller@hotmail.com
The company this month is engaging in the activity! All projects Free
shipping expense.

<china.powerseller@gmail.com> wrote in message 
news:1171362021.866100.195840@h3g2000cwc.googlegroups.com...
> Dear friend :
Bit presumptuous? <snip>
> We are a big agent for Laptop > Mobile Phone\Digital Camera\CDJ\DJM\Apple Ipod\PSP\VEDEO GAMES > \Television\GPS\Telescope in CHINA .
And what does this have to do with driving LEDs? This is not an appropriate place for advertising these sort of items. <snip rest of spam>