How to set up IR detection

Thread Starter

helpmeunderstand

Joined Apr 23, 2010
17
I am trying to set up a simple (so I've been told) circuit for detecting an IR beam.

I have:
an SFH 5110-36 IR detecting phototransistor with an amplifier inside
an IR LED
a power source
some resistors

I'm not sure what the proper configuration should be. I'm fine for setting up the LED to turn on. But I don't know what gets connected to each of the 3 prongs of the transistor. I believe i should be able to measure the 5V output from the middle prong. ground is connected to one of the outer prongs, but what about the 3rd prong?

do i need to connect anything else on the outside?

I know barely nothing about circuits and terminology, so if you're kind enough to help, imagine you're explaining it to a 3rd grader. I'm smart, but still learning.

thanks,

-a
 
Last edited:

Thread Starter

helpmeunderstand

Joined Apr 23, 2010
17
The LED should not show visible light.

If it is, you either are overpowering it, or it may not be an IR led.

Here is a link to the datasheet that will show you which pins do what, and how it works:
http://www.datasheetarchive.com/pdf-datasheets/Datasheets-14/DSA-263028.pdf

thanks, i'veseen the data sheet, and am still confused. this should tell you how clueless i am.
it figure 1, everything inside the box is inside the SHF5100, right? what is Vcc, is that voltage?

the 2nd diagram is what I guess i should be following.
i see 5 volts into pin 3. ground to pin 2. output from the middle.
but what is uC?

and more stupid perhaps, what is the triangle with a bar on top?
 

retched

Joined Dec 5, 2009
5,207
Vcc is supply voltage. That should be ~5vDC. no greater than 6.3vDC

u is latin for "micro"
C is abbreviation for "Controller"

So a uC is a microController
uA is microAmp
uF is microFarad

The way this works, Is You put 5v on the Vcc pin.
Gnd to ground (the negitave battery or power supply terminal)
the other pin will have no voltage on it when there is no IR
it will have Vcc when there is IR.

So If you put 5.1v on Vcc and shoot the IR at it, you should read 5.1v on the middle pin.

That middle pin will be your trigger. The remaining circuit that you build, will look at that middle pin, wait for it to go high(5v) then activate, or do whatever you want your circuit to do.

the triangle with a bar, is a DIODE symbol.

You may want to take an hour or so and read through the eBook at the top of every page on this site.
http://www.allaboutcircuits.com/vol_3/chpt_3/1.html
diode info
 

Thread Starter

helpmeunderstand

Joined Apr 23, 2010
17
Vcc is supply voltage. That should be ~5vDC. no greater than 6.3vDC

u is latin for "micro"
C is abbreviation for "Controller"

So a uC is a microController
uA is microAmp
uF is microFarad

The way this works, Is You put 5v on the Vcc pin.
Gnd to ground (the negitave battery or power supply terminal)
the other pin will have no voltage on it when there is no IR
it will have Vcc when there is IR.

So If you put 5.1v on Vcc and shoot the IR at it, you should read 5.1v on the middle pin.

That middle pin will be your trigger. The remaining circuit that you build, will look at that middle pin, wait for it to go high(5v) then activate, or do whatever you want your circuit to do.

the triangle with a bar, is a DIODE symbol.

You may want to take an hour or so and read through the eBook at the top of every page on this site.
http://www.allaboutcircuits.com/vol_3/chpt_3/1.html
diode info

thanks for all that info
i have hooked up one end to 5V, and the other to the ground of the power supply.
if i want to read the Voltage, does the COM of my voltmeter got to the same ground? i assume all ground is ground, but I don't really know. when i do that, the middle pin reads 0.678. when I use the IR LED, nothing happens (sometimes it changes to 0.679, but sometimes no change). of course since i can't see it, maube it's not working.
would this work with any remote i have lying around?
 
Last edited:

retched

Joined Dec 5, 2009
5,207
The COM is ground on the meter.

As for the IR led, you SURE you have it in the right way?

How much voltage are you putting to the LED and what resistor are you using?

If you have a cellphone camera, you can use it to "see" IR.
 

Thread Starter

helpmeunderstand

Joined Apr 23, 2010
17
The COM is ground on the meter.

As for the IR led, you SURE you have it in the right way?

How much voltage are you putting to the LED and what resistor are you using?

If you have a cellphone camera, you can use it to "see" IR.
well, i'm using a little LED tester box. i've tried the LED in all the positions ranging from 2 to 50 mA, and i've reversed it since i really don't know which is the ground on the LED (both pins are the same length. on my other red LEDs the ground pin is shorter than the other)

i can't see the IR LED in my cell phone (iphone) camera. i guess that must be the problem.

i also tried switching the input and ground to the transistor since i'm not sure which prong is 3 (V) and which is 1 (grd). still no change
 
Last edited:

Thread Starter

helpmeunderstand

Joined Apr 23, 2010
17
Is there a flat spot on the side of the led?
actually, i guess i had the angle wrong with the phone. I can now see the LED with it. (and that's a great fact to know, thanks).

unfortunately, i'm still not getting any output from the SFH5110. currently, I have the top pin connected to 5V, middle pin connected to a red LED, the ground connected to the ground of the power supply and to the ground of the red LED (which i know works with less than 5V).

shining the IR LED on it (from 1 cm away) should turn the red LED on, right?
I have a few of these things, so I know it's not just one that's busted

any other ideas? and i really appreciate the trouble shooting by the way
 

retched

Joined Dec 5, 2009
5,207
well, no.. It only puts out 1.5mA. You wont see much. You will need to trigger a transistor to get the juice to power an led.

Use your meter to see if you get 5v on the middle pin.
 

Thread Starter

helpmeunderstand

Joined Apr 23, 2010
17
well, no.. It only puts out 1.5mA. You wont see much. You will need to trigger a transistor to get the juice to power an led.

Use your meter to see if you get 5v on the middle pin.

i see. now i understand the imprtance of current i guess.
well, i've tried it again with the voltmeter.
this time the voltmeter is actually 0 with no ir, and ranging from .015 to .002 when the ir is shined on it. when i switch the meter to mV i get 7.4. it does go higher when it seems my LED is hitting it dead center. i have no idea how narrow the beam of the LED is. but it should output 5V anyway, right?
 

Markd77

Joined Sep 7, 2009
2,806
A look at the datasheet tells me you need to emit IR at 36KHz for the sensor to give any output. Continuous IR will not do anything. A 555 timer can produce the 36KHz required.
Have a look here for 555 timer operation and formula.
http://www.allaboutcircuits.com/vol_6/chpt_8/3.html

<ed>Just thought I'd mention that most TV remotes work at the same frequency so you can use one to test the reciever. You will probably only see a quick change in output </ed>
 
Last edited:

Thread Starter

helpmeunderstand

Joined Apr 23, 2010
17
A look at the datasheet tells me you need to emit IR at 36KHz for the sensor to give any output. Continuous IR will not do anything. A 555 timer can produce the 36KHz required.
Have a look here for 555 timer operation and formula.
http://www.allaboutcircuits.com/vol_6/chpt_8/3.html

<ed>Just thought I'd mention that most TV remotes work at the same frequency so you can use one to test the reciever. You will probably only see a quick change in output </ed>

ok. i'll see if I can do that. thanks
 

Thread Starter

helpmeunderstand

Joined Apr 23, 2010
17
also, what does active low output mean? I saw that on the spec sheet too. with no LED should my phototransistor thing be 0 or 5V? mine always reads .681V

i have a function generator which I have set to 10V with at 36kHz with a sin wave function. will hooking that up to the LED work?
 

AlexR

Joined Jan 16, 2008
732
The SFH 5110-36 expects to see the IR beam modulated by a 36KHz carrier (that's what the -36 in the type number means). In other words you must switch your IR LED on and off at a rate of 36KHz for theSFH 5110-36 to detect anything.
Also most remote control IR detectors are set up to ignore steady carrier so you will have to gate your carrier on and of at a relatively low frequency, I.E. you will need to send bursts of carrier to the LED.
 

Markd77

Joined Sep 7, 2009
2,806
Active low means that the output should be a logic 0 (around 0-1V) if there is 36KHz IR detected and logic 1 (around 2.5-5V) if nothing detected. Check datasheet for the actual voltages. 0.681V seems odd, I'd expect a high output, check the wiring.

You can use your function generator - put a 470 ohm resistor in series with the led and it should be fine.

The IR reciever that I used is fine with a steady carrier frequency - output stays low - but your mileage may vary.
 

Thread Starter

helpmeunderstand

Joined Apr 23, 2010
17
Active low means that the output should be a logic 0 (around 0-1V) if there is 36KHz IR detected and logic 1 (around 2.5-5V) if nothing detected. Check datasheet for the actual voltages. 0.681V seems odd, I'd expect a high output, check the wiring.

You can use your function generator - put a 470 ohm resistor in series with the led and it should be fine.

The IR reciever that I used is fine with a steady carrier frequency - output stays low - but your mileage may vary.
thanks, would a 330 ohm resistor work? that's all i have at the moment.
so, just to be sure, with no LED, i should be seeing 2.5-5V on the middle pin?
(will it vary like that even if the input voltage is 5V?). So, I guess I'm obviously setting this up wrong. I have one pin hooked up to the possitive end of a power supply. the other end to the negative end. The middle pin goes to the voltmeter. i'm not sure about the ground of the voltmeter. i have it hooked up to the ground pin of the transistor/power supply.

one more question. will the transistor get hot when it's got the 5V coming out? (and that should be when no IR light is on it?)
 

Markd77

Joined Sep 7, 2009
2,806
You have it connected wrong, from the bottom of the datasheet:
Pinning SFH 5110
1 OUT
2 GND
3 VCC

Looking at the thing with the blob facing you, pin 1 is on the left. Measure that with the voltmeter.
Connect pin 2 to ground (negative), connect pin 3 to 5V and you should be in business.

Output should be 4.5-5V, with no 36KHz IR, 0-0.5V with IR.
Phototransistor will not get hot.

330 ohm is too low for a 10V supply. Try 2 X 330 ohms and see if you can see anything on the cameraphone.
 

Thread Starter

helpmeunderstand

Joined Apr 23, 2010
17
You have it connected wrong, from the bottom of the datasheet:
Pinning SFH 5110
1 OUT
2 GND
3 VCC

Looking at the thing with the blob facing you, pin 1 is on the left. Measure that with the voltmeter.
Connect pin 2 to ground (negative), connect pin 3 to 5V and you should be in business.

Output should be 4.5-5V, with no 36KHz IR, 0-0.5V with IR.
Phototransistor will not get hot.

330 ohm is too low for a 10V supply. Try 2 X 330 ohms and see if you can see anything on the cameraphone.

wow, that was dumb. i was sure i knew how to read ...

anyway, my current setup is using a AAA battery for power.
so, my SFH5110 is correctly setup reading an output of 1.369V

but it doesn't go down at all when the IR led is on.

also, the voltmeter reads the same voltage even if the ground pin of the SFH5110 is not connected. that is, if my voltmeter is connected to the ground of the battery and the output of the SFH5110, the + of the battery is connected to the Vcc input on the SFH5110. i don't know if this is supposed to happen or not, but it seems normal since the circuit connects up through the voltmeter.

anyway, any more insight into why the IR LED isn't working? i tried a regular remote control as well.
also, is it true that it won't work if the LED is on continuously?
i want to use this a motion detector. so a 5V signal is sent when the beam between the LEd and the sensor is interrupted
 
Last edited:

retched

Joined Dec 5, 2009
5,207
also, is it true that it won't work if the LED is on continuously?
No, its a lie.
Oh crap or is that a lie?

But seriously, the IR receivers typically ignore continuous IR to filter out sunlight or other IR sources that could confuse the device.
 
Top