IR Phototransistor as IR Sensor

Hey everybody, I have a problem. I'm trying to use an IR phototransistor as an IR sensor. I keep getting nothing from the IRremote library's decode function on the IRrecv class instance. I set the receiver to pin 13, got nothing, then set it to pin 11, and still got nothing. Can anybody help me? I'm using the built-in IRrecvDemo example program.

Hi, welcome to the forum.
Must use a 3-pin IR receiver for remote control signals, not just a photo transistor.
3-pin IR receivers (e.g. TSOP38**) are much more than just a photo diode/transistor.
They also contain decoder circuitry.
Transmitter carrier frequency and receiver frequency has to be the same (e.g. 38kHz).
What are you trying to receive?
Leo..

I'm trying to use the remote provided by the SainSmart Uno Starter Kit. I fried the IR receiver, and have no other choice.

and have no other choice.

Then forget it.

The IR signal from a remote is modulated, and your receiver has to contain a demodulator in it. This is not something you can do with an IR sensor alone.

Thanks anyways. I'll just have to go to RadioShack and purchase a new one.

Did you get one of these with your starter kit? :

sainsmart.PNG

They refer to it as an IR receiver and it is an equivalent of the TSOP device mentioned in the thread.

he said he fried it and was trying to use the phototrans as a replacement.

Sounds like you need to make a voltage divider circuit? Take the arduino +5v through a 100K resistor, connect that to the + lead of your phototransistor, the other lead to ground. put your signal pin in between them. Should work like a potentiometer.

Sounds like you need to make a voltage divider circuit?

No it doesn't.

Should work like a potentiometer.

Yes it will, which is exactly what he doesn't want to do with it.

astrojr1:
Sounds like you need to make a voltage divider circuit? Take the arduino +5v through a 100K resistor, connect that to the + lead of your phototransistor, the other lead to ground. put your signal pin in between them. Should work like a potentiometer.

So you didn't understand the fact that the signal from a remote has to be demodulated.
The IR remote libraries expect a demodulated datastream.
Look at this, and see what's inside those receivers.
Leo..

Thanks everybody for the help.

Take a look on it

Payam_sbr:
Take a look on it

https://youtu.be/mwgnsFCX03E

Bad advice to replace a highly specialised $1 38kHz receiver with a $1 photo diode + transistor.

The 3-pin IR receiver has circuitry to suppress 50/60Hz (fluorescent) light as well as ambient light.
The diode/transistor does not have that.

If you want to go cheap, go to the junk yard.
Almost every old TV/stereo/VCR etc has a 3-pin IR receiver.
Leo..

Payam_sbr:
Take a look on it

https://youtu.be/mwgnsFCX03E

Nope. Terrible idea.

However, see this to understand the difference between what comes out of an IR photodiode and an IR receiver:

[u]LINK[/u]