Go Down

Topic: IR sensor from other devices, on arduino (Read 6580 times) previous topic - next topic


Sep 12, 2010, 06:32 pm Last Edit: Sep 12, 2010, 06:33 pm by MattiaReznor Reason: 1
I found an old TV PCI board, wich has an IR receiver module used for the remote control.

Is it possible to use this device with arduino?

I open the plastic jacket and found 2 cable(red/white) wrapped around copper cables .. is that a shield? or there are 3 different signal?

How can I used with arduino?

edit :


This looks like 3 signals, power (probably 5V), ground, and a data output. My guess is that it's a logic-level IR detector like a PNA4602. It should be possible to use this with an Arduino.

For an example of how to use logic-level detectors with an Arduino, and how to learn and re-create IR signals you can look at our sample code for the Gadget Shield.

The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, light sensor, potentiometers, pushbuttons


The unwrapped one should be the ground in your opinion?
should I put some resistor between the 5v and the anode?
or somewhere else ( before the input) like I would do with a LDR ?


Sep 12, 2010, 07:06 pm Last Edit: Sep 12, 2010, 07:07 pm by MattiaReznor Reason: 1
BTW, thanks for the code, but i'm not kinda interest in mux/demux the signal for some remote control ... I just wanna relieve if there is some ir point to the receiver ( for some kind of alarm)

Is that possible without that size of code? or this will alway receive some kind of IR signal from the ambient?


The unwrapped one should be the ground in your opinion?

I would think so, but I can't be sure.

should I put some resistor between the 5v and the anode?

If it's a logic-level receiver like I think it is, then no. It's not so much an "anode/cathode" device as a full integrated circuit with logic. So just plain 5V and GND for power, and the output is digital.

I'm not really understanding how you plan to use this for an alarm...sorry.

The Quick Shield: breakout all 28 pins to quick-connect terminals


let's say that I point a IR LED turned to the IR receiver, then this should be like in a status 1 ... if an object pass between the LED and the receiver, this should prevent the IR to get to the receiver which then be on a status 0

Thats the general idea that I had ...I dont know if is impossible for some reason, like a noisy IR ambient wich could keep the receiver in a 1 status ( is that make sense ? :D)


You just want to sense "IR signal seen"/"not seen".... which might well work... sort of.

Regarding will ambient IR be a problem: probably not. Probably the sensor is only paying attention to an IR signal, if that signal is on/off/on/off very rapidly... a specific frequency... when it is "on". There are two signals here, working a very different frequencies. Think of Morse code being sent by a buzzer. A "dit" or "dah" might last, say, 100-300 ms... but be made up of an on/off/on/off in the kilo hertz.

Using the signal sent by the IR transmitter is REALLY easy.... If you're going to go to the trouble of getting the thing working, you might as well take the small extra step....



At that page, you'll see where you can buy.... $3 + p&p something that we all THINK you MIGHT have. Might as well work with a known-good new one as fight with something that may or may not work? And when everything ELSE is working, swap in your salvaged part, and see if it will do.


Sep 12, 2010, 09:24 pm Last Edit: Sep 12, 2010, 09:26 pm by davekw7x Reason: 1
This kind of receiver will have an output that is high unless it sees signals with certain characteristics.

In particular, it will not work with a constant signal from an IR LED.  There is a phase-locked loop inside the detector module that only responds to carriers of 38-40 kHz. Any given detector type is optimized for a particular frequency, but my experience is that the carrier frequency can be off by 5-10% and it will work (but the range may be reduced from, say, several meters to, say, one meter or so, depending on the power and optical characteristics of the IR transmitter).

There are filters that make the detector immune to a steady carrier, so if you apply a continuous 38-40 kHz square wave to your transmitting LED, the receiver still won't work. (Its output will remain high.)

Control signals that use devices like this consist of a sequence of on-off keyed carrier of pulses. That is, for each bit in the control signal, the carrier will be on for a few hundred microseconds and off for a few hundred microseconds, where the ratio of on-time to off-time may be used to determine whether a particular bit is a zero or a one.  There are lots and lots and (and lots) of different timing and bit sequence schemes for specific appliances, but the bottom line is that the hardware won't act as a simple IR detector that you are trying to make.

A simple IR photo-transistor might be a better choice for simple applications.  It won't be as "robust" (might require optical filtering to reduce effects of ambient light, for example), and it might not have the performance of the packaged module, but if all you want is to detect whether the IR beam is interrupted, the software can be really simple.



Footnote:If you really want to "get into" the real deal about using TV remote controls, you might start at Ken Shirriff's arcfn.com site.

For example: http://www.arcfn.com/2010/03/understanding-sony-ir-remote-codes-lirc.html


Thank you davekw7x, ill go with the IR phototransitor which seems to be the right choice for what i'm looking for

Never thought about a phase-locked loop inside the detector
Always think to it as simple as possibile!

BTW, with this kind of device(IR phototransitor) woulndt be possibile to make a remote function( with on-off pulses and a computer which understand that )?

I belive that's not completely clear to me the difference between this receiver

Thanks again anyway!


The photodiode is just the sensing element. Devices like the PNA4602 take the current from a photodiode it, filter it, amplify it, etc. to provide a digital on/off signal. Here is a block diagram of the PNA4602 showing the photodiode within it:

Need a custom shield? Let us design and build one for you.


The funny thing is, that those receivers cost only as much as you would expect each of the 7 or 8  elements inside it will cost.


Sep 13, 2010, 09:43 am Last Edit: Sep 13, 2010, 09:47 am by davekw7x Reason: 1
cost only as much
Production costs are ridiculously low.  Development costs are completely amortized by the first few million parts sold (probably a lot sooner than that).  These things are used in just about every TV and other IR remote-controlled consumer appliance on the planet.

We small-timers benefit from the economics of scale.  If you can buy one from Digi-Key for a less than a buck, the cost to a big-time contract manufacturer is literally a few cents in large quantities. The parts manufacturer still makes a profit, and the distributer and other middlemen also mark it up a few percent as the parts pass through their hands.

It's a wonderful time to be alive, right?



Johan O R

I got the same "IR eye on wire" as on the first picture in this topic, i took it apart and this is the connections:

Wire---Function--mini Jack
Red    =  signal = tip
White  = Vcc    =  ring
Shield =  Gnd   = buttom

I connected it to a 5V PSU and measured with digital multimeter on the red wire, it was 5V when not activated and 3V when i pointed a remote control to it. I believe that if I used a scope, I would see the signal go to zero.
Johan o r

Go Up