0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« on: March 10, 2010, 06:51:48 pm » |
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.comThis is the schematic I'm using:  TIA -ioan
|
|
|
|
« Last Edit: March 10, 2010, 07:04:53 pm by ioan »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 35
Arduino rocks
|
 |
« Reply #1 on: March 10, 2010, 07:07:55 pm » |
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
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #2 on: March 10, 2010, 07:27:52 pm » |
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
Newbie
Karma: 0
Posts: 33
Why won't this work!
|
 |
« Reply #3 on: March 10, 2010, 07:41:04 pm » |
What size resistor are you using on the emitter? Maybe to much resistance.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #4 on: March 10, 2010, 08:06:04 pm » |
For the emitter LED I'm using 470 ohm, and for the phototransistor 10 K.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 35
Arduino rocks
|
 |
« Reply #5 on: March 10, 2010, 08:10:47 pm » |
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
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #6 on: March 10, 2010, 11:57:12 pm » |
Even with 47 ohm I get only few inches.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15316
Measurement changes behavior
|
 |
« Reply #7 on: March 11, 2010, 12:10:40 am » |
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
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #8 on: March 11, 2010, 12:22:52 am » |
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
Newbie
Karma: 0
Posts: 33
Why won't this work!
|
 |
« Reply #9 on: March 11, 2010, 12:49:45 pm » |
One other thing; what pins are you using? You might look at the section on "DIGITAL PINS" http://arduino.cc/en/Tutorial/DigitalPinsIf you are using pin 13 it might be the problem. See NOTE under pullup resistors.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Online
Brattain Member
Karma: 137
Posts: 19032
I don't think you connected the grounds, Dave.
|
 |
« Reply #10 on: March 11, 2010, 01:06:28 pm » |
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.
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #11 on: March 11, 2010, 01:40:49 pm » |
@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
Online
Brattain Member
Karma: 137
Posts: 19032
I don't think you connected the grounds, Dave.
|
 |
« Reply #12 on: March 11, 2010, 03:46:23 pm » |
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.
|
|
|
|
|
|
0
Offline
Tesla Member
Karma: 71
Posts: 6611
Arduino rocks
|
 |
« Reply #14 on: March 17, 2010, 08:11:25 pm » |
Have you read the single customer comment on that page - about there being two versions of the phototransistor of different sensitivities?
|
|
|
|
|
Logged
|
|
|
|
|
|