Pages: [1]   Go Down
Author Topic: Infrared Emitter and Phototransistor for 2-3 feet  (Read 2344 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I was trying to use this pair of Infrared LED and Phototransistor with a Arduino project and so far everything works. The problem is that the distance between the two can't be more than 2-4 inches... Am I doing something wrong? Should I find another solution? Will a brighter IR LED increase the distance, or do I need a more sensitive Phototransistor? Both?

This is what I got:
Matched Infrared Emitter and Phototransistor Detector - RadioShack.com

This is the schematic I'm using:



TIA
-ioan
« Last Edit: March 10, 2010, 07:04:53 pm by ioan » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Depends how they are arranged. If side by side and you're trying to detect reflected IR, then this seems about right. If the emitter is pointing at the detector 2-4 ft, or even metres, would be more like it.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

They are pointing at each other and I get only max 4 inches... I even inserted both of them in a tube with the interior the size of the LED/pPhototransistor circumference and length of about 12 inches and they can't see each other.

Am I doing something wrong?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Why won't this work!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What size resistor are you using on the emitter?  Maybe to much resistance.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For the emitter LED I'm using 470 ohm, and for the phototransistor 10 K.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try 100 ohm for the LED.
Check the data for the LED. IR ones should have an If max of 100mA or so.
If this is the case you could probably take the resistor down as far as 47 ohm
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Even with 47 ohm I get only few inches.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why don't you take your TV remote control and point it at your detector and see if the distance increases or not. If not then you probably need a better detector or you could try a amplifer stage after the detector to increase it's gain.

Lefty
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I get about the same range when I point the remote control at the phototransistor. Can you point me in the right direction on how to build an amplifier for the detector?
Thanks.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Why won't this work!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One other thing; what pins are you using?
You might look at the section on "DIGITAL PINS"
http://arduino.cc/en/Tutorial/DigitalPins

If you are using pin 13 it might be the problem.   See NOTE under pullup resistors.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 291
Posts: 25884
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Rather than make an amp, why not buy a 38kHz IR detector?
It will mean you have to modulate the LED, but you will get much better range and won't be so badly affected by high DC light levels.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@garym:
I'm using rbbb board. This one doesn't have a resistor on pin 13.

@AWOL:
I was researching what other options I have and, just like you said, I saw that are IR detectors available, even sparkfun sells one I think. I'm not an electronics guy, how hard is to make a modulator for the IR LED?

What I'm trying to make is a beam-break detector to replace a mechanical button that triggers an event in my project. The solution should be cheap because I'm trying to make a sellable product and I'm at the upper limit already :-)
« Last Edit: March 11, 2010, 02:21:17 pm by ioan » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 291
Posts: 25884
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
how hard is to make a modulator for the IR LED
Well, it depends on how busy doing other things your Arduino is - it could be software (if it isn't very busy) or it could be something like a 555 plus couple of resistors and capacitiors (if it is busy).
All you need is 38kHz square wave.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For anyone interested in how to do this, Ken Shirriff's blog has an example using the Arduino IR Library:

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

0
Offline Offline
Shannon Member
****
Karma: 201
Posts: 11740
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you read the single customer comment on that page - about there being two versions of the phototransistor of different sensitivities?
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: