Getting the most from an LED
2008-11-10 20:52
Hi guys. I have recently written the walkthorugh on how to transmit serial data with an IR led and it works fine. Now to the next step: i want to achieve the highest range possible with my LED, without using external aids such as lenses. (that is: only with electronics).
I have a TSAL 6100 from Vishay ( http://www.farnell.com/datasheets/93358.pdf ). If I am right, to achieve the most out of it, i have to get a current similar to the "peak current" value from the manual in the LED. But as for the voltage i guess i just need to give it at least a value equal to its forward voltage.
Problem is, i am not sure about the things i have just written... :) Is it really the right way to do it?
Suppose it is, i cannot give enough current to the LED with an output pin, so i think i'll be using either a mosfet or a standard NPN. But again, how do i exactly know what current i will get with it? As far as i know i have to measure the "amplification value"( hFe?) with my multimeter and multiply that to the current entering the base. Am I right?

No internal resistance
As detailled elsewhere (can't quite pinpoint it) LEDs cannot possibly exist as they defy the laws of physics. One of the physics-defying features is that they have no internal resistance and will therefore "suck" as much current as you supply (for a brief period until they burn out and produce lots of really smelly Zauberhafte Rauch).
Yes, I think it's a good idea to think of volts as being pushed by the source and current as being pulled by the device. You might "give" a device a certain voltage, but you "allow" it a certain current.
So, to prevent them burning out, you use a series resistor. It is this resistor which dictates the current allowed to flow through the LED by the formula V=IR (V=Voltage, I=Current, R=Resistance).
If you have a 1.35V source and your Imax is 100mA: V=IR becomes R=V/I = 1.35/0.1 = 13.5, so you need a 13.5 ohm resistor.
Now ask me how you get 1.35V from a 5V supply.
"lots of really smelly
"lots of really smelly Zauberhafte Rauch)."
:P
/Nick
Don't forget the voltage
Don't forget the voltage drop across the led (most diodes have a drop of 0.7V but I'm not sure about LED's) So I think it would actually be R = (1.35V-Vdiode)/0.1A.
Gabe
How do you get 1.35V from a
How do you get 1.35V from a 5V supply?
Don't you use resistors in parallel? Wait no, that increases current? I dunno, I'm so confused:X
haha my newbie book is sayin somethin about using resistors to divide voltage.
(Vin) X R2/(R1 + R2)
I don't get why, but everytime I've used a resistor with my learning lab, its only been a 1k resistor, nothin less, even when dealing with higher voltages, I don't get it :/
voltage divider: common misconception circuit
A voltage divider (two or more resistors) will only work accurately when each resistor has the same current flowing through it. If you divert some current in the middle (the divider point?), the top R will experience a higher current than the bottom one. And your careful calculation fails.
So use V-dividers only when you are not drawing a lot of current (relatively speaking) from it. If you must draw more current (as in your problem here), you should use clever voltage regulators that maintain the right voltage, regardless of the current drawn.
Maybe BoA is hinting at several diodes in series?
8ik
I was
Yes, but then I realised that 6 is too many and 5 isn't enough.
Maybe you could use an appropriately biased transistor to drop the voltge...
But now you've brought you potential dividers, can you see a way of (ab)using the desired forward current as part of the equation? Is this what's known as Thevenin's Theorem? See we're into analog electronics and that's where I step aside and leave it to you.
Wrong Wrong Wrongety Wrong!
I am not an electronics expert. Analog or otherwise. I have no idea how to bias a transistor. I just learn about this stuff on websites (mostly this one). I realized the misconception is common when I saw the poster make the same mistake as I made only a few days ago.
Thevenin Who? Black boxes? Predicting their behaviour? Wow. Don't let Frits get wind of this!
Huh?
I think we're safe from artistic rants now.
Wind blew over his head.
Peaks and valleys
In the Absolute Maximum values section, the If forward current is a max continuous value, what to shoot for if you have the device constantly on as an illuminator. Note the Ifm value of 200 mA, combined with a tp/T duty cycle of 50% and a tp time of peak of 100us for a pulse. So if you are pulsing the LED (like you are in using it for IR communications) then you can drive it a little harder. And still stay under the Power Dissipation of 210 mW (200 mA If x estimated 1.6v Vf = 320 mW, but only half the time, so 160 mW)
So to get that if you have a 5 volt source, minus the 1.35 Vf forward voltage drop of the LED, equals 3.65 volts. This 3.65 is what would be used to calculate the limiting resistor, so 3.65v / 200mA = 18.25 so use n 18 ohm standard value. BUt only if you are going to pulse the LED in communucaitons. And note that an MCU pin will not deliver this 200 mA current, a transistor or darlington driveris needed, which adds it's on voltage drop into the equation.
Ok i get it, so it's gonna
Ok i get it, so it's gonna be: output goes to the base of the NPN, collector gets the pwm signal at 50% and then there will be a 18 Ohm resistor in series with the emitter and at last the LED.
Thank you for your anwsers :0)
oh wait one thing... 3.65V * 0.2A = 0.73W ...does that mean i have to use a 1W resistor? (ps: what did you mean by standard value?)
Resistance is futile
Yep, probably need a 1/2 watt or at least a quarter watt resistor (LED only takes 210 mW, which was calculated above).
Standard values for 10% resistors are multiples of 10 12 15 18 22 27 33 39 47 56 68 & 82 .
Not sure what you meant by the "collector gets the PWM signal at 50%" but all that is needed is the serial signal driving the base of the transistor. Might need an inverter somewhere, as adding the NPN transistor inverts the serial signal. Maybe : serial signal feeds a PNP, which drives the base of the NPN which drives the LED. The PNP inverts the signal, which is re-inverted by the NPN to go out as it was fed in.Or just NPN to NPN if that is what is in your component box.
wait wait...i don't get why
wait wait...i don't get why a quarter resistor is ok...isn't the power passing through the resistor 0.73 W(as i wrote before)? How come a 1/4 W is ok then?
Sorry for my ignorance :( but i still don't get what you mean by 10% resistors and their values (unofrtunately i don't study these things at school). The only thing i can think of is... tolerance (if that is how you call it)
Messed up estimates
Yep, I was thinking of the LED power, not the resistor power dissipation. Both pass the same current, but not the same watts, so a 1 watt resistor would be best. THe only reason a half watt meight be ok, is that you are only passing that current part of the time, and estimating a data stream to be half 0s and half ones would give you an estimated half the power dissipated. But being safe would spec a 1 watt there.
Here is a web page listing what resistors are available according to what toerance they are :
http://www.elexp.com/t_eia.htm
You can see from it that 10% tolerance resistors only are mannufactured in certain values, 5% in more values, 15 even more. So if you want a cheaper resistor (10%) you have to get one close to the value calculated.
Vf
A schematic says a 1000 words
That was all very complex and a little confusing. I've tried to sum it all up with a schematic.
Note: Because of the dutycycle a 1/4W resistor will be fine as the 1/4W rating is a continuous rating. There is also a small voltage drop across the collector/emmiter of the transistor at saturation (usually 0.4-0.8V) but I usually leave this out and call it a safety margin.
Just read the datasheet, to achieve max range this LED can be pulsed at 200mA for 100mS in every 500mS period but unless you get the timing right the magic smoke will be released from the LED.
thanks for the schematic,
Periodic updates
Hmmm.. I think Robologist is right.
one thing: instead of using
Sounds possible
first attempt was a failure.
first attempt was a failure. I followed oddbot's schematic except for a 10k resistor instead of a 1k and the PWM pin connected instead of the v+ (to the collector). The led flashes but the receiver reads "0"....don't really know why. According to my calculations it should have received the "opposite" (aka inverted value) of 100 (which is the value i was trying to transmit), like it happened with my previous setup when i exchanged the anode and cathode (pwm to cathode and serout to anode with inverted signal).
(but still, if i am going to use it that way, i don't think i'll gain much more power)
One thing: what happens if i setup two NPNs (in order to "connect" pwm signal and serout signal and send them both in the base of the primary transistor)? i mean...the current will be very high, won't i risk destroying something? Sya the outputs offer 20mA, do i have to stay under that current?
Ok, I know where you went wrong
The schematic I gave you was based on experience as I've done this before. You need the 1K resistor to the base of the transistor to ensure transistor saturation thus allowing max current through the LED.
Your PWM should connect to the base of the transistor via that 1K resistor (MCU output). The transistor will amplify the PWM output and the resistor in series with the LED will limit it to a safe value.
By connecting the collector to the PWM output, the current through the LED was limited to what the processor was capable of sourcing on a pin (probably 25mA max) assuming the transistor conducted at all as you have not told us what you connected it to?
If you want to go for the 200mA output then use a 18ohm resistor in series with the LED. Just make sure your duty cycle is 50% or less and that your frequency is above 5KHz as suggested by Robologist.
wait wait, i know that by
wait wait, i know that by doing that i won't get a high-power transmission, that was just a test to see if the comunication would work. Eventually, to achieve a high-end transmission, i am gonna (i think) AND the serout signal and the PWM signal and send the to the BASE of the transistor, while the collector will get connected to V+.
But now i am not trying to do that. I was just trying to comunicate the "standard way", just to see if everything worked as it shoul so i just connected the serout to the BAE and the PWM to the collector, but nothing got transmitted...even if the LED flashes...
ANDing both
yes. i was thinking about a
yes. i was thinking about a scrappy ANDing since i don't have an AND gate: that is using another transistor. But i am worried this may lead to some "too much current" issues, and don't really know how to understand if it will really be like that.
This is what i was thinking of:
Transistor AND gate
Here's a link to a transistor based AND gate :
http://hyperphysics.phy-astr.gsu.edu/Hbase/Electronic/trangate.html
It uses NPNs as high side drivers and compensates for the 2 transistor drops by having a higher supply voltage, but you might be ok with just a 5 volt supply. Their explaination of the circuit is a bit weird too. You might sub 1ks where they have 10ks.
sounds fun! i am gonna try
but wait, i don't get one
but wait, i don't get one thing: if i use a transistor and its hFe (which should be Ic/Ib where Ic is current passing thorugh the collector and Ib current reaching the base) is, say, 100, and i have an output pin that gives out 20mA, what is going to happen?
In other words, these are the things i don't know about:
- current of the output pin: what is it? is it the max amount of current it can give out?
- when a current of 1mA reaches the base of the transistor (hFe=100) does it mean that 100mA CAN pass through collector-emitter or WILL pass through collector-emitter?
Ohms Law