Go Down

Topic: IR LED without resistor nano (Read 3827 times) previous topic - next topic

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)
https://www.modmypi.com/electronics/leds/super-bright-5mm-ir-led-940nm/?search=ir%20led
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.

INTP

What are the specs on your USB power source? There is no 'standard'. Actually describe yours.
Because, while you could use the Arduino's 5V pin to pull 200mA from, you will get better distance if you power the IRLED with your power source (instead of through the Arduino) which will allow pulling 1A or whatever the source has available.
If you're using some kind of phone charger, look to where it says on the sticker something like "OUTPUT DC5V ~~ 1000mA".

Power source goes separately to Arduino and IRLED, Arduino controls transistor to pulse IRLED @ <1% duty cycle. Make sure your transistor collector current is at least whatever mA your phone charger is.

CrossRoads

If you run that LED over 20mA continuously, it will heat up and ultimately fail prematurely.
Make sure to read the notes, like this one for 1.2A current:
1. 1/100 Duty Cycle, 10μs Pulse Width.

USB input power on Uno has 500mA rated fuse, so there's one limit.
Barrel jack has 1A rated reverse polarity protection diode, and 5V current comes from a 800mA rated regulator, which will overheat and shutdown well before that if more than 7.5V is brought in.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

markyj

I will have to get back to you on the power supply then as i am not able to look right now.
Am i correct in thinking that 1.2A is max for running the led via pwm?
I am also thinking for my next test then is to try the led on 5v pin limited to 100ma to see the range on that. If it is fine then i think i might go with that.
Using a nano is there a pin to pull directly from usb or would that require some rewiring? Is it the vin pin that i can pull directly from usb as i read i could do that somewhere.

Wawa

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

Use the diagram from post#10.
Use two IR LEDs and a 22ohm (not 82ohm) resistor in series, powered from the 5volt pin of the Nano.
Note that the 5volt pin of a Nano is 4.6volt when powered via the USB connector.

You have linked to narrow beam LEDs (10 degrees).
Your remote will be directional.
Leo..

CrossRoads

1.2A, but only on for 10uS.
PWM of 1, i.e. analogWrite(pwmPin, 1) yields a 3.9mS or 3900uS wide pulse.
You're gonna fry that LED.
Run it at 20mA.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Wawa

#21
Nov 28, 2016, 05:23 am Last Edit: Nov 28, 2016, 05:23 am by 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..

MrAl

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)
https://www.modmypi.com/electronics/leds/super-bright-5mm-ir-led-940nm/?search=ir%20led
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.

Wawa

You can get away with just using 2 i/o pins and no transistor.
Bad practice though.
Leo..

markyj

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.

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.

MrAl

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.

Wawa

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


INTP

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.

MarkT

I think the point was to wire them in series...  5V is enough for 3 IR LEDs I think.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

CrossRoads

  • Forward Voltage: 1.2V
  • Max Forward Voltage: 1.6V

Yes, 3 in series from 5V would work.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up