Go Down

### Topic: Signal from IR transmitter is too weak.. (Read 7902 times)previous topic - next topic

#### leftdal

##### Sep 28, 2011, 06:10 pm
Hello!

I attach high output IR LED (from radioshack) to Arduino.

But the signal is too weak to catch it from decoder, less than 30cm...

I think there is something missing point...

Arduino pin2---- resistance --- (+) IR LED (-) ----- GND on Arduino..

Is that wrong?

Thanks

#### johnwasser

#1
##### Sep 28, 2011, 06:24 pm
Perhaps you calculated the resistance incorrectly?

What is the voltage drop across the LED?

What is the current requirement of the LED?

If you have the 276-0143 "High-Output 5mm Infrared LED" the answers are 1.2V and 100mA.  That would be a problem because the Arduino output can't source 100 mA (40 mA MAX).  You would typically use a transistor to switch the high current.  Perhaps you could tie three output pins together and draw 33.3 mA from each.

5v - 1.2v = 3.8v
3.8v / 0.0333 A = 114+ Ohms  (Use 120 ohms)

So:
Arduino pin2---- 120 Ohm ---\
Arduino pin3---- 120 Ohm --- |
Arduino pin4---- 120 Ohm ----+--- (+) IR LED (-) ----- GND on Arduino..

Turn all three on and you should get close to 100 mA through the LED.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

#### leftdal

#2
##### Sep 28, 2011, 07:44 pm

Perhaps you calculated the resistance incorrectly?

What is the voltage drop across the LED?

What is the current requirement of the LED?

If you have the 276-0143 "High-Output 5mm Infrared LED" the answers are 1.2V and 100mA.  That would be a problem because the Arduino output can't source 100 mA (40 mA MAX).  You would typically use a transistor to switch the high current.  Perhaps you could tie three output pins together and draw 33.3 mA from each.

5v - 1.2v = 3.8v
3.8v / 0.0333 A = 114+ Ohms  (Use 120 ohms)

So:
Arduino pin2---- 120 Ohm ---\
Arduino pin3---- 120 Ohm --- |
Arduino pin4---- 120 Ohm ----+--- (+) IR LED (-) ----- GND on Arduino..

Turn all three on and you should get close to 100 mA through the LED.

Thanks all

Yes, exactly!! I'm using 276-143 from radio shack, 1.28v 100mA

Please let me know if you have any other option

#### leftdal

#3
##### Sep 29, 2011, 12:12 am

Note that if you don't switch ALL three pins SIMULTANEOUSLY, you run the very serious risk of damaging your Arduino.  johnwasser should have also provided the special code it takes to address the port directly (vs. digitalWrite to each pin in turn).

Note that the conventional (because it is SAFE) way of doing this is to use an external transistor as a switch, and a single Arduino output pin.   Like this...

Thanks all..

I think I should try to do it using transistor to get 100mA.

Can you guys introduce any sites showing how to do it? I want to follow it step by step.

Thanks

BR,

#### johnwasser

#4
##### Sep 29, 2011, 03:47 am

I believe that 100mA is the total package limit for output pins,  and prudence would to with the more conservative design using the external transistor switch.

The current limit for Vcc and Gnd pins is 200 mA.  The processor draws 12 mA (MAX) which leaves 188 mA for other things, assuming the power supply can provide 200 mA.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

#### Chagrin

#5
##### Sep 29, 2011, 06:55 am
Even 20ma in an emitter like that should be sufficient to send a signal 30cm. Are you not getting any signal to your decoder at any distance? Are you pointing the top of the emitter at the decoder?

#### Grumpy_Mike

#6
##### Sep 29, 2011, 10:38 am
IR LEDs can be obtained that operate at a number of different wavelengths, you have to make sure that the receiver and transmitter both have a peak response at the same wavelength.

However having said that 30cm is a long way for a 100mA LED and an unamplified detector. I think you are expecting too much.

IR remotes use modulated IR and an amplifier built into the detector to get the distance you see from them.

#### leftdal

#7
##### Sep 30, 2011, 05:46 pm

I rescind my warning and apologize to johnwasser.  By using separate resistors on each output, he is mitigating the problem of switching the outputs asynchronously.  Indeed it forms a crude digital to analog converter where each pin turned on provides a portion of the current.

However I believe that 100mA is the total package limit for output pins,  and prudence would to with the more conservative design using the external transistor switch.

The method is as simple as using most any NPN transistor (like 2N2222, etc.) and a base resistor, say ~500 ohms or so.  As shown in the third circuit in the illustration.

So in the illustration, R4 is the base resistor (500~1000 ohms), T1 is the NPN switching transistor (2N2222, etc.), R3 is your LED current limiting resistor, and LED4 is your IR LED.

The value of R3 can be calculated conveniently online here: http://led.linear1.org/1led.wiz
The "Source voltage" is whatever you are powering the LED from.  You said 5V.
The "Diode forward voltage" you said is 1.28V
The "Diode forward current" you said is 100mA
So if we plug those values into the calculator, it says that R3 should be a 39 ohm resistor, and it needs to be capable of handling 1 Watt.
Note that you can use lower-power resistors in parallel to get the 39 ohms @ 1 Watt.

I have
IR transmitter: 276-143 High-Output Infrared LED, 1.28V and 100mA
IR detector: PNA4602
* Length: 5.20mm/0.21in
* Width: 6.98mm/0.28in
* Height: 7.86mm/0.31in
* Weight: 0.43g/0.02oz

According to the calculator (http://led.linear1.org/1led.wiz), I need 39 ohms and 1W.

In this case, I guess I do not need to use a transistor. Just simply connect (5V)---Ohm--IR LED--GND
Is that true? or I still need to use a transistor?

Now, I have NPN transistors (2N222A 2N3904 2N4401 from radio shack)

The problem is  I do not have the resistor(39ohm 1W)..

Thanks again

#### Chagrin

#8
##### Sep 30, 2011, 07:52 pm
You must not be modulating (blinking) your LED at 38Khz as required by the PNA4602. That sensor will not give a reading if the LED is steady-on. Without the modulation you might see the PNA4602 giving spurious signals (especially in bright sunlight) but that's a different issue.

See: http://www.arcfn.com/2010/03/detecting-ir-beam-break-with-arduino-ir.html

While you're getting things worked out I'd suggest using a visible color LED so you can see what's happening. A decently-bright red LED at 20ma should give you a few feet of transmission distance. Once you have the basic programming worked out then you can then jump to the IR led/transistor circuit running at ~100ma.

#### johnwasser

#9
##### Oct 02, 2011, 03:26 am

I have
IR transmitter: 276-143 High-Output Infrared LED, 1.28V and 100mA

According to the calculator (http://led.linear1.org/1led.wiz), I need 39 ohms and 1W.

In this case, I guess I do not need to use a transistor. Just simply connect (5V)---Ohm--IR LED--GND
Is that true? or I still need to use a transistor?

100 mA is still greater then 40 mA which is the largest current you can safely pull form an Arduino output pin.

You can use a 1/2 Watt 100 Ohm resistor to run the LED at 40 mA but that won't be full brightness.  To get full brightness you still need some way to switch higher current, such as the NPN transistor.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

#### Grumpy_Mike

#10
##### Oct 02, 2011, 07:40 pm
Quote
Just simply connect (5V)---Ohm--IR LED--GND
Is that true? or I still need to use a transistor?

If you don't need to control the LED with an arduino then yes that will work.
However, if you need to modulate the LED or turn it off sometimes then you need a transistor.

Go Up

Please enter a valid email to subscribe