Getting the most from an LED

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.

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.

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!

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 :frowning: 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
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.

Huh?
Huh?

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)?

Sounds possible
Give it a shot, just whatever gets you good solid comms.

"lots of really smelly

"lots of really smelly Zauberhafte Rauch)."

:stuck_out_tongue:

/Nick

I think we’re safe from artistic rants now.

Wind blew over his head.

2008_fundraiser_micro_button-en.png

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?

 

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
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

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).

how cool :slight_smile: