IR LED without resistor nano

This is used for a remote.
I suppose it is (or should be) pulsed 50%, so a peak LED current of <=100mA is acceptable for a 50mA LED.
I picked a 22 ohm CL resistor for two LEDs in series on a ~4.6volt supply for a reason.
Leo..

markyj:
Ok after reading the further replies i gathered that the 5v pin provides 200ma and that i can use this pin to power the led, then use a transistor to switch the led. And of course add the resistor to the led.
My question i have is you have said that i can run 200ma through the led, but im told it is 50ma.
Here is the led i have (should really have added this in my first post)
5mm IR LED - 940nm | The Pi Hut
I also looked at the datasheet (download on link) and saw that dc forward current stated 50ma and then saw that peak forward current (1/100 pwm) was 1.2A.
So from what i've been told and read on the data sheet is the led max current via pwm is 1.2A (not going to run at that level anyway) and the 5v pin can provide a max of 200ma safely (well rated but half should be better as not to run at max). I have tried to find a definitive answer to this and have read that the 5v pin provides 200ma, 500ma and 900ma but didn't find anything officially stating it. Also i will be powering via usb using a standard usb plug (the sort used for phone chargers, not fast charge ones).
Just want to thank everyone for their help, knowledge and patience with me on this. Cheers.

Hi,

You dont seem to be reading all the posts here. You can get away with just using 2 i/o pins and no transistor.

MrAl:
You can get away with just using 2 i/o pins and no transistor.

Bad practice though.
Leo..

MrAl:
Hi,

You dont seem to be reading all the posts here. You can get away with just using 2 i/o pins and no transistor.

I did read that, the only issue with that is the library uses only pin 3 to do the switching, it's not an issue for me to use a transistor though i could still go that route for the powered circuit. I will see what works that is safe and go from there.

Wawa:
This is used for a remote.
I suppose it is (or should be) pulsed 50%, so a peak LED current of <=100mA is acceptable for a 50mA LED.
I picked a 22 ohm CL resistor for two LEDs in series on a ~4.6volt supply for a reason.
Leo..

Yes a remote sort of, more of an ir blaster so it will be static. I have 2 more leds that i can try with too then though wont be able to test for a couple days so will need to get back to you on that idea.

markyj:
I did read that, the only issue with that is the library uses only pin 3 to do the switching, it's not an issue for me to use a transistor though i could still go that route for the powered circuit. I will see what works that is safe and go from there.

Yes a remote sort of, more of an ir blaster so it will be static. I have 2 more leds that i can try with too then though wont be able to test for a couple days so will need to get back to you on that idea.

Hi again,

Oh ok well that is fine if you are happy with using the transistor circuit shown in this thread, but be aware that if you are using a library for your LED right now and that lib is running the LED straight from the i/o pin and the remote works well with the device(s), then it may not work with the transistor circuit from this thread so far. It depends on how you have the LED connected right now without the transistor.

If you have it connected so that a low on the output pin causes the LED to turn on, then the transistor circuit will not work as is.
If you have it connected so that a high on the output causes the LED to turn on, then the transistor circuit will work as is.

So if you have the LED connected with resistor to the pin and LED cathode to ground, then it will work with the transistor circuit shown in this thread.
On the other hand if you have it connected so that the resistor is connected to +5v and LED cathode to the i/o pin, then you'll have the change the transistor circuit so that it will supply the same signal to the LED, and that means putting the LED and it's resistor in the emitter circuit of the transistor rather than the collector circuit. Not a big deal really except for a little more voltage drop (0.7v).

Also, note that changing any library to work with 2 pins instead of just 1 is not going to be a very big mod most likely. You just have to find where the pin 3 is being turned on and off and include another digital write instruction and possibly change the timing slightly. Not sure if you are into that kind of mod or not but i'm sure someone here can help.
On the other hand, a transistor on the output like that is probably safer for the Arduino chip in case anything gets wired wrong or something else goes wrong. The transistor might blow but not the 328 chip.

markyj:
Yes a remote sort of, more of an ir blaster so it will be static.

Same difference.
The Arduino produces a 36-38kHz square wave carrier, so the LED is 50% of the time on and 50% of the time off.
With 50% duty cycle, the IR LED can handle 2x the continuous rated current, 100mA in this case.
By using two LEDs, you have twice the "IR light" ( not twice the range, more like 1.4x).
A second "2-LED + resistor" string can be added to the same transistor for "more light".
Or add two wide-angle LEDs.
Use a ~330ohm base resistor for two LED strings.
Leo..

Wawa:
If you want range without the high current issues, use a second IR LED.

Is that really how physics works? Two equally dim LEDs being visible from further than one equally dim LED? This would be news to me if their distance adds somehow.

I think the point was to wire them in series... 5V is enough for 3 IR LEDs I think.

  • Forward Voltage: 1.2V
  • Max Forward Voltage: 1.6V
    Yes, 3 in series from 5V would work.

"Two equally dim LEDs being visible from further than one equally dim LED?"

Yes.
Example: 1 LED all by itself at X lumens vs. a billboard-full of those same LEDs each doing the same X lumens

The OP might get some additional advice if he said exactly what he is doing and also what IR receiver he is using. There may be better alternatives, like for long range a narrow viewing angle is better so the beam is concentrated.
Here for example is a 3 degree / 100mA IR diode http://uk.farnell.com/osram/sfh4550/led-ir-5mm-850nm/dp/1573495

There may also be more sensitive receivers available for his application.

INTP:
Is that really how physics works? Two equally dim LEDs being visible from further than one equally dim LED? This would be news to me if their distance adds somehow.

Read all about it. Electromagnetic radiation is additive. Read all about it.

Yes they really do add up. It is only when it comes to resolving the individual components of the radiation do you need the sensitivity to observe the EM flux from one.

INTP:
Is that really how physics works? Two equally dim LEDs being visible from further than one equally dim LED? This would be news to me if their distance adds somehow.

Other matters aside, LED efficiency drops as the current increases - people using large LED grow lights, for example, typically run the LEDs well below their maximum power rating to reduce the power bill. So you get more light out of two LEDs at 20mA each than one identical led at 40mA.

reminds me... More LEDS = brighter

INTP:
Is that really how physics works? Two equally dim LEDs being visible from further than one equally dim LED? This would be news to me if their distance adds somehow.

Hi,

Well that may not be a fact, but it is very possible. The other variable involved here is the DIRECTION.

For example, we have one LED facing north and one facing south. Do their emissions add? Certainly not. Now rotate the south one so it points east, do their emissions add now? Still no. Now rotate that same one a little more north, do their emissions add now? A little, depending on the flux pattern of each LED. If one LED points north and one north east, then the flux patterns only overlap in the direction between north and north east, which would be very roughly where the hour hand points to 1:30 on the a standard 12 hour clock.

But of course we point them both in the 'same' direction when we want to use two for an IR remote control right? It still depends on the pattern to some degree, but we estimate the total flux to be the sum of the two which makes it seem twice as strong. Will it reach a receiver at twice the distance with the same level of light? It will probably be close although not exact, so maybe a little less than twice the distance or if we get lucky we do get twice, but i think it's a good estimate that we get twice the distance.

The remote i use most these days has three LEDs and it is made by Sony. It can also read codes from other remotes (very handy).

Well that may not be a fact,

YES IT IS. >:(

Will it reach a receiver at twice the distance with the same level of light?

Having a higher intensity of light will not go further than the lowest intensity of light you can get which is a photon.

There is no limit on how far a photon can travel if it is not blocked.

But the brighter the light the more photons arrive at given distance and so the easier it is to detect. Light doesn't just go so far and then stop.

Grumpy_Mike:
YES IT IS. >:(
Having a higher intensity of light will not go further than the lowest intensity of light you can get which is a photon.

There is no limit on how far a photon can travel if it is not blocked.

But the brighter the light the more photons arrive at given distance and so the easier it is to detect. Light doesn't just go so far and then stop.

NO IT IS NOT :slight_smile:

You should have read the rest of the post.

The light direction has to be taken into account, as well as the phase if they are of the same exact wavelength.
I gave a simple example where the two light sources were facing away from each other, there's no way their light can add.
Also, there are experiments that depend on the phase difference even though they are both pointing in the same direction.

Two facing in the same direction would look something like this:
)~~~~~~~ --->
)~~~~~~~ --->

and for our purposes they may add, but these two can NOT add:
<--- ( ) --->

because they are facing entirely different directions.

The actual addition would come from looking at their radiation pattern and how those patterns overlap. If both have a bright spot in the middle but they are pointing in slightly different directions, then there is a distance D where only their outer rim patterns overlap so the full intensity will not be had.

Two LEDs can be seen from a farther distance than one because there are more photons in the same area with two instead of one. That adds to the POWER found at the receiver end, which of course can activate a sensor better. It does not matter that both LED photons go the same distance, it is that when they do get there there are more of them to act on the sensor and thus provide more of a signal. This means sometimes we say "the light goes farther" even though the photons dont, just that the influence is stronger.
In other words, the remote works at a greater distance from the sensor.

Oh dear we are at it again MrAL are we. You have a track record of not understanding things, but thinking you do.

You should have read the rest of the post.

I did, painful as it was. I am glad I never taught you physics, you would have failed.

The light direction has to be taken into account, as well as the phase if they are of the same exact wavelength.

No. The phase is only important if the light sources are coherent, in an LED they are not. And the direction is irrelevant. Just assume an isotropic radiator and an emission intensity adjusted to compensate.

I gave a simple example where the two light sources were facing away from each other, there's no way their light can add.

Yep and a pretty stupid example it was. You can not get any light source that does not have some radiation in some direction, only in your unrealistically simplistic world can this happen, in real life it does not. But there was no point in this example anyway it did not advance the argument.

Basically it all comes down to the derivation of the inverse square law and the area on the sphere of radiation corresponding to the area of the sensing element receiving enough photons to get a sufficiently large signal to noise ratio to allow reliable detection.

and for our purposes they may add, but these two can NOT add:
<--- ( ) --->

because they are facing entirely different directions.

That would be true if there was such a thing as a light source that only radiated in one direction. They do not exist.

This means sometimes we say "the light goes farther"

Yes you say it, but it is total bollocks from a physics point of view, which is what was being expressed in the question I responded to, which was:-

Is that really how physics works? Two equally dim LEDs being visible from further than one equally dim LED? This would be news to me if their distance adds somehow.

I hope you agree that the answer is yes they do add, and if you define "the light goes further" in a totally none physics way of meaning "the distance limit of sensing".

Grumpy_Mike:
I am glad I never taught you physics, you would have failed.

I am glad you never taught me physics and poor children if you teach any. You can define the vague statement "light of two sources add under any conditions" in such way that it is true. But in any reasonable and useful sense it is not true. You say there is no such thing as directional source of light. What about a LED on a meter thick concrete? I guess it will take many years until the first photon from the LED passes the barrier. You want to say two LEDs separated with the concrete adds their intensity in any sense? What about LEDs in other galaxies? But we do not need to go so far ofc. It is common feature that LEDs produce relevant amount of light in limited angle. It is needed to take the different spatial intensity into account when estimating total light produced in given direction just as MrAl said.

What about a LED on a meter thick concrete?

Read reply #36, I said

There is no limit on how far a photon can travel if it is not blocked.

Get the end bit - NOT BLOCKED

I am glad you never taught me physics and poor children if you teach any.

I never taught Physics to children, just grownups.