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 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?)
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.
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!
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)
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 :
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 You know I didn’t even realise forward voltage was a voltage drop. I often wondered why LED resistor values were so high (compared to what I expected tehm to be)!!
thanks for the schematic, thanks for the schematic, really helpful. One thing: where did you get the "in every 500mS period" from? That could be a problem for me, and not only for me i guess, since you sometimes need to send something like 3 or 4 signals per second.
Periodic updates The Absolute Maximums section of your datasheet has in Peak Forward Current parameter has some conditions. It shows tp/T = 0.5, which refers to a duty cycle of 50%, on half the time, off half the time. It also gives tp of being 100 us, which means the T would be 200 us for a frequency of 5000 Hz. I was making an estimate that half your bits in a serial data stream would be on, and half off to allow you to drive at the 200 mA level. I finally went back and read your IR-serial tutorial, and realized you are modulating the LEDs with PWM so that the recievers would respond to them. So as long as you have a PWM signal above 5000 Hz (which you are probably running around 40 kHz or so) you should be fine driving the LEDs close to the 200 mA rating.
one thing: instead of using one thing: instead of using two transistors (PNP & NPN), what about using one NPN like in OddBot’s schematic and use True signals (which means using “T” instead of “N” in the serout command)?
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?
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 Yes, it is possible for a 1 mA base current to turn into 100 mA of collector current if the collector resistor is the right size to allow 100 mA. Starting at the voltage source of 5 volts. There is a voltage drop across the CE junction of transistor. maybe 0.3 at 100 mA or so, on up to 1 volt at 500 mA or more. Depends on the spec sheet of the transistor. hFe is a highly variable quantity across the range of currents possible and should only be used to note possible performance… The resistor limits the amount of current delivered.
It works! The problem i had was related to…well…misreading of the datasheet, i thought the collector was on pin 2 whereas it was on pin 1…
Anyways, i’ve used the schematic of the AND gate with transistor and placed my resistor and IR led on its output (on the output of the AND gate) and it works. As for the coding I used T (true) reception on the receiver and it works (notice that i kept N on the sender).
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.