PDA

View Full Version : How to work with IR sensors



The Master
- 22nd December 2007, 20:48
Hi. Im trying to make a circuit to detect a remote for a TV. I have a few sensors laying around (the 3 pin ones). Ive seen some diagrams on the net. Version 1 of this (http://fly.cc.fer.hr/~mozgic/UIR/) looks nice and simple but how would i code something like that? All the examples either dont give source code or give out hex files.

mackrackit
- 22nd December 2007, 22:46
Search post by dhouston on this forum, I think he has posted a solution in the past.

The Master
- 22nd December 2007, 23:09
I dont think i found the post you are refering to but i have picked up a few things. I just want to clarify some of them.

Can i connect an IR sensor directly to a serial port without a PIC chip? That link i posted earlier has an example that may or may not work.

Do i need to buy a specific sensor? I have a few laying around. Wont any of those work?

What about sending too. I assume that if question 1 is a yes then this one would be really simple. Just the transmitter and a resistor connected to TX?

dhouston
- 22nd December 2007, 23:20
It's impossible to say without knowing the specifications of what you have lying about. I usually recommend the TSOP1100 because it covers carrier frequencies from 32kHz-57kHz.

There are several schematics on the WinLirc (or Lirc if you do Linux) that use minimal hardware with the serial port.

You need to be aware that the RS232 voltage levels are on the order of 12-15V so you need to take steps to limit the voltage but, the answer is yes it can be done.

The Master
- 22nd December 2007, 23:33
Sounds good.

I dont know if it will help but the bits i have laying arround have come from an old amstrad sterio system (the really big ones). One is from a hitachi VCR thats about 25 years old now. Ive got a sky box here thats not doing anything too. Im just trying to track them all down. I know they are in the loft somewhere. Might take a while to find. I could always drop into maplin i suppose.

Can someone explain version 2 in that link i posted please. I dont understand it. Where does it even get the power from?

dhouston
- 23rd December 2007, 03:02
Most IR receivers cost $1 - $1.50. It's not worth your time to sort through obsolete junk.

In the schematic you refer to, power comes from the RTS & CTS lines, The zener diode drops it to 5V.

The Master
- 23rd December 2007, 14:40
It looks really simple then. I think ill have a trip into Mansfield and buy one from Maplin. Should i be using a zenner diode? Ive heard that you should use a voltage regulator instead