I am trying to set up a basic IR communication and I am having troubles with the range.
The receiver seems to work great and using a common hifi remote control, I can trigger it from about 5-6 meters which will be enough for my project. But using arduino and an IR led, I can't make it trigger further than 1-2 meters.
So I have a few question:
What resistor should I use with the IR led? In some internet pages they say 100omh, in others 330 and I've even seen 1komh. Playing around with it, I even tried without any resistor and the range doesn't improve much.
Since I only need to transmit an ON/OFF state, I though I don't need the IRremote library. I just used the tone function to produce a 38khz signal, which works, but not further than a couple of meters. Is that the proper way to do it?
I did try with the IR library as well, the range improved by a bit, but again nothing like the range of the remote control. Further than a meter, I need to make sure the LED is pointing right into the receiver and again this won't work beyond 2-3 meters.
I even connected in parallel more than 1 LED I didn't see much improvement. In that case, should each LED have its own resistor, or can them branch out after a single resistor?
If you're powering the LED with arduino itself , I'd rather NOT use any resistor .
The easiest way to control it is basically giving current to the transmitter so it just sends a signal , and put the receiver between the circuit power and itself , so the circuit being on would require the receiver to receive signal .
ch3_gr:
ok no resistors.
But for the receiver to pick up the signal, the LED needs to transmit a 38khz frequency right, doesn't it?
I'm not sure on the "no resistor" thing.... that depends on the forward voltage and allowed current of the LED, so you need to check that from the datasheet.
You will need a 38k carrier yes, assuming the receiver is 38k. Normally the actual message would be superimposed on that, but your off and on is your message.
I'd say if it's working close-by, then the frequency side of things is good. It's probably that the signal has dissipated by the time it gets to the receiver. Don't forget, the strength varies inversely as the square of the distance.
To be honest I am quite new to all these electronics, so I can't really figure out what resistor it needs from the datasheet.
But as far as I understand, small or no resistor means stronger IR light right? (with the danger of burning it of course)
Or is it the case that they perform better within the specified voltage range?
The receiver is indeed working at 38khz, I checked it with a variable tone and that's where it triggers.
I understand the square root principle of light dissipation, I am just surprised the wifi remote has so much greater range.
The datasheet tells us that it wants a current of 50mA (0.05A) and a voltage of 1.5.
If you're powering the LED from Arduino's 5V (I think that's what you said), you have to lose the extra 3.5V over the resistor. the resistor must limit the current to 0.05A. Ohm's Law tells us that R = V / I, so for V=3.5 and I = 0.05, you get R = 3.5 / 0.05 = 70 Ohms. That might look low, but that 50mA is quite high; LEDs are usually about 20 or so. So go for the next largest resistor in your box. Don't go smaller, that will give current > 50mA.
edit... ignore that and read reply #6: you need to limit the current to about 20mA for an Arduino i/o pin... my bad, brain fart.
Btw you mean you....
..... understand the squareroot principle of light dissipation
That is a very odd datasheet - particularly when it proposes using an IR LED for "Decorations, Advertising Sign, Indicators, Illuminations, Traffic Lights, Flashlights". Do the Chinese really have infra-red vision?
Also odd is the specification for current - 50 mA continuous, 80 mA peak. IR LEDs - used principally for this purpose (or in fact, illumination for cameras) usually anticipate being pulsed at something like double the average current for less than 50% duty cycle. Still, I suppose these specifications are reasonable. If you are going to ensure it never gets left continuously switched on, you can probably operate it at 80 mA.
In any case you cannot do this by direct connection to an Arduino -in - you should expect to use no more than 20 mA from an Arduino pin, so a resistor of (5-1.5V)/20 mA or 180 ohms would be correct. To drive it instead with say, 60 mA, you need to use a general-purpose NPN transistor with a 1k base resistor driven from the Arduino pin, emitter grounded and collector going via a 56 ohm resistor to the LED cathode with the anode to 5V.
ch3_gr:
I understand the square root principle of light dissipation, I am just surprised the wifi remote has so much greater range.
It is actually the inverse square law; the intensity falls according to the reciprocal of the square of the distance.
For decent range you drive IR emitters at more like 100 to 150mA, and that means using a
transistor to boost the Arduino output. The diode's continuous rating isn't really relevant, the
peak current is - if you have the right datasheet check it.
Another reason your range may be less than you expect, is that the angle for that LED is very wide.
Usually when sending a modualted IR signal you can get away with more current going thru the LED.
If you are sending a continuous signal @ 50% duty cycle then your average current is 50% of the peak. I did note from the data sheet that the peak current is 80mA, so you could chose the resistor for that. (approx 47 Ohms. ~= 3.5/.08)
If you have some spare LEDs to risk you could even try a lower value resistor based on a 50% duty cycle.
However, I suspect your main issue wrt range is the Angle - Half angle of 110 degrees (+/-55).
In comparison a TSAL6100 IR LED has a half angle of 20 (+/- 10) degrees
The other hint is that the list of intended applications in the data sheet does not seem to include remote control. The wavelength is correct @940nm.
TIP: Using IRremote you can set the modulation frequency (which defaults to 33% duty cycle ) and use the mark & space functions directly to generate your own custom signals.
Ok I will do another round of test, with the suggested resistor values.
Paul__B:
To drive it instead with say, 60 mA, you need to use a general-purpose NPN transistor with a 1k base resistor driven from the Arduino pin, emitter grounded and collector going via a 56 ohm resistor to the LED cathode with the anode to 5V.
I may try the transistor as well. I assume you mean 5V from the arduino's power pin, not one of the in pins right?
AnalysIR:
However, I suspect your main issue wrt range is the Angle - Half angle of 110 degrees (+/-55).
In comparison a TSAL6100 IR LED has a half angle of 20 (+/- 10) degrees
By that, do you mean that the more focused (smaller) the angle is, the further away it reaches?
thank you for all the input
And yes you are right, inverse square root is the correct term, as well as hifi and not wifi!
AnalysIR:
The other hint is that the list of intended applications in the data sheet does not seem to include remote control.
That list of intended applications is - as I attempted to point out - entirely absurd, the only application relevant to an IR LED is "Illuminations". The list is clearly one intended for visible LEDs and is simply attached at random with no engineering oversight.
Which potentially invalidates much of the dataheet, really.