SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By moorejohn90
#147794
Hi, I want to make IR led and IR receiver (both of them are look like normal LED, IR LED is transparent, IR receiver is black color ) for making sensor for catching intruder. I bought it from electronic market of MYANMAR where I live.
1- I hook up IR led like normal LED in one of Arduino's digital pin and ground.
2- I hook up IR receiver LED as LDR with resister.

I only got short range (not exceed 4 to 6 inch).
I want to get long range ( around 4 to 5 feet).
How do I get it.
Thanks.
By moorejohn90
#147795
Hi, I forgot to tell this,
3- open IR led and printing the result that are getting from IR receiver to serial monitor. The serial result changes when I put something between them. I can know someone is passing trough by checking the serial result.
THANKS
By fll-freak
#147796
1) Find an IR LED that has a small optical divergence. Some will spread the light out to fill a room, others will generate a somewhat focused beam. For long range, you want a tight beam.

2) Find an IR transistor that also has a tight angular sensitivity angle. More light that comes in on axis will get to the sensor.

3) Increase the current to the IR LED to just bellow the maximum rated on the part. If you do not have specs, buy a few spares and slowly increase the current till it burns up. Then assume the maximum is 20ma less.

4) Increase the sensitivity of the transistor. A second stage amplifier using a normal transistor would be a possibility.

5) Put the sensors across from each other so the optical axis are lined up.

6) Put the sensors in places shielded for IR light.

7) Put the sensor at one end of a tube that acts as a light baffle.

8) For very long ranges with lower false alarms, you need to modulate the IR signal. Look for TV remote control demodulator modules and long range TV remote controls. Power the remote from a power supply. Glue down a button (volume is a good choice) to get a steady stream of codes. Arrange for your receiver module to send the data to something like a PIC, Arduino, MSP430, or other micro. Look for the code and if you fail to get it for a few times, sound the alarm.
By moorejohn90
#147797
Hi, fll-freak, Thank for your reply. Is the way of connecting IR receiver or IR transistor (as you said) to A0 pin of arduino correct? Or if is wrong how do I make it.
By fll-freak
#147801
So there is a difference between an IR transistor and an IR receiver.
An IR transistor is either a two or a sometimes a three pin part that often looks like a transistor or an LED.
An IR receiver module is often much larger and is sometimes found in a metal box.

Sounds like you have an IR sensitive photo transistor.

If you have a transistor, then you will have had to connect a pull up resistor (10K to 100K) to it. The sense junction (transistor-resistor junction) might swing enough to go straight to a digital input or could be sampled via an analog pin.
If you have a receiver, the output is normally digital and could be sent straight to a digital pin on the Arduino.

I think we had better start at square one and have you give a detailed description of how you have this hooked up. What pins go where, what voltages are being used, what sense resistors, any specs on the parts if you have them, part numbers, and anything else that would allow us to recreate your situation.
By Mee_n_Mac
#147815
fll-freak wrote:I think we had better start at square one and have you give a detailed description of how you have this hooked up. What pins go where, what voltages are being used, what sense resistors, any specs on the parts if you have them, part numbers, and anything else that would allow us to recreate your situation.
Or we could put in a call to Carnac the Magnificent. :mrgreen:
By moorejohn90
#147825
Hi fll-freak, I made my circuit as follow-
1- Drive IR LED as normal LED -- Long side of LED pin to Arduino's pin No 13 and short side to Ground.
2- Long side of IR transistor(as you describe) to Ground and short side to Arduino's pin No A0 and 10K resister pass through short side of IR transistor with Arduino's A0 to 5V. That all.
By the way, I got IR light range up to 1 and half feet as I describe above :dance: . I got that info from "https://sites.google.com/site/therobotr ... on-circuit". I think, the way of connecting IR transistor to Arduino was wrong (positive and negative because it is not like normal LED as describe in the above link) :doh:
By the way, is any way to increase the light range to more than 1 and half feet(as I got).
Thanks
By fll-freak
#147832
So the basic circuit is ok. So now it is time go back and re-read my post of Wed Jul 25, 2012 9:20 am.

First thing would be to boost the LED power. Driving the LED from the Arduino is not likely to push the LED that hard. Driving the LED with a proper current limiting resister from a power source (not an IO pin) would be a good first step.

Do you have specs for the parts you are using or do you have spares we can destroy to figure out what the max current the LED can support is? Do you at least have a multimeter with current and voltage measurement ability and do you know how to use it?
By stevech
#147858
to get IR serial data to work in a practical sense requires an IR receiver module. They're inexpensive.
With this, the data is used with a carrier such as 38KHz which is the center of a bandpass filter in the IR receiver module.
By fll-freak
#147868
stevech wrote:to get IR serial data to work...
Don't think the OP cares about data, but rather a beam to break for a security system. But even in the case of a security beam, a modulated beam using an IR receiver would held prevent false alarms. But I think the guy is working with parts he can scrounge in MYANMAR (not exactly the Digikey center of the world).
By Mee_n_Mac
#147875
There's so little information to go on, it's hard to recommend what to do.

Driving the IR LED harder seems to be a good 1'st step. Driving it straight from an Arduino I/O pin is not a good idea and certainly less output power than the max I'd expect any LED to be capable of. Restricting the FOV of the receiver might also be a good idea. Putting it in a tube so it doesn't "see" as much reflected light should also help. The bandwidth of the reciever is probably not well matched to the expected signal as well. Perhaps some simple low pass filtering might help as well. The OP could record some 100 or so samples of the detected output, with and w/o a signal, and attach a text file with those so we could see what's going on.

Lastly I wonder is he might be better off using a peak detection scheme. That is really drive the LED hard for a short period of time to get as much signal as possible. Detect the peaks at the receiver and then declare the beam broken when 2 or more peaks are missed.

Really finally lastly I agree using a IR LED and IR receiver module (as in a TV remote) is the best way to go. Obvciously they work at more than the 4-5 feet desired. Drive the LED with a 555 circuit and again use a missing pulse type of detection scheme. He'll have to be a little tricky in that these receivers are made to detect bursts of coded IR, not a continuous 38 kHz stream.
By fll-freak
#147877
Questions like this are always a problem, because the OP states a solution to a problem without the background information. He has already focused on an IR solution when something else might be a much better choice. I was just thinking that one of those ultra cheap laser pointers on the IR transistor might solve the long range security beam problem. If his market sold an IR LED and transistor, I can't imagine the stall next to that not having those keychain laser pointers. The beam is still invisible (except perhaps in high particulate air at night). The range could be at least 20 meters if not 200.
By moorejohn90
#147976
Hi everyone, I was not be able to check to my post because of going trip in the last few days. Today, I got another useful info especially from fll-freak. Thank to fll-freak, Mee-n-Mac and stevech. Yep, as fll-freak said, I am going to try with laser pointer.
By the way, is anyway of checking forward-current of LED or IRLED? Because, I can't get it from shops where I bought it. And is it possible to drive laser pointer from Arduino. I think, I need to use transistor. How to check the forward-current of laser pointer.
By fll-freak
#147988
It is not possible to determine what the maximum forward current of a device is unless you have the datasheet or you are willing to burn up a few devices to determine the breaking point.

The laser pointer will likely run on a few batteries. Perhaps 2 AA or a few coin cells. Determine the voltage and duplicate that to power the pointer. Do not try to run it from an IO pin like you did the IR LED. Your electronics store should have an adjustable voltage regulator or possibly a regulator of the correct voltage.

The forward current of the laser pointer can be determined by using the current mode of most multimeters.

How are you powering the Arduino? From USB or from a power adapter? You need to make sure that you do not over consume power from the Arduino and damage its voltage regulator.

If you are using a separate power supply, then run wire from this to a voltage regulator and then to the laser pointer. Run wires to the other side of the room to power the Arduino and the receiver/alarm.

Put the receiver in a black felt lined tube to prevent the scatter from the laser pointer from giving you away. The best solution would be to buy an IR laser module, but that may not be available to you.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]