For today's how-to we spent some time rummaging around in our parts box to build a serial IR remote interface for our PC. We took a few pieces from various designs to come up our own, built specifically to work with
WinLirc or LIRC; it can transmit and recieve IR signals, just imagine the possibilities.
It'll probably work with other software packages, but may require some small modifications.
For today's how-to you'll need:
- IR(Infrared) LED (RS 276-142)
- IR Receiver module (RS 276-640)
- 4.7uf and 100-220uf capacitors
- 47ohm and 4.7k resistors
- Sub-D 9 pin Female Connector
- NPN Transistor (cheapies from RS are fine)
- PC Board
- Sacrificial USB Cable
- Tools, hookup wire, solder, etc.
Everything can be picked up at RadioShack or your favorite electronics supplier. We dressed ours up a bit, but you can succeed with just these parts. We hear that the RadioShack IR receiver we used has been known to produce flaky data, but ours worked fine.
The receiver portion is pretty simple. Rather than use extra parts to generate stable power from the serial port, we decided to steal 5 volts from the USB port.
The transmitter is a little bit more complicated. The resistor is 47 Ohms, and the capacitor can be 100 to 220uF. The
WinLIRC project recommends using the TX pin of the serial port for better performance.
To test our our customized circuits we built it on a breadboard first. Using WinLIRC (which is getting kind of old at this point) we easily recorded commands from our remote and got around 10 feet of range with our transmitting LED. We suspect you can get even more range, but the surround receiver we tested with is a bit picky.
Breadboards just aren't good enough for us, we had to pull out the soldering iron. Here's our Serial connector with USB connector to supply a solid 5 volts to the transceiver. And yes, we'll cover those exposed leads with some heat shrink tubing.
We built our remote transceiver to use a standard piece of Cat-5 so we can easily place it wherever we need it. Upstairs, the ceiling... or next to the hot tub.
Download WinLIRC and unzip the folder to wherever you want it to reside. There's no installer, so somewhere on C: or in Program Files might be a good idea. Double click the remote + computer icon labeled winlirc.
The first thing you'll get is an error message. Click OK to pull up the configuration window.
Select the correct COM port. Usually it'll be either COM1 or COM2. Most of the default values are fine. The receiver should be DCD and under Transmitter, TX should be selected. Finally, click Browse next to the Config line. To get started, select sample.cf and hit OK. It won't let you create a new blank config. If you think everything is correct, click on the Raw Codes button. If everything is correct, you'll get a new window. Otherwise you get an error message.
Point a remote at the receiver. If you see codes, it's working! Close the window and click on the Learn button in the main configuration window.
WinLIRC will complain some more. Click Yes.
Now we get the Learn remote window back again. This time we get prompted. Enter a name for the remote like VCR and click Enter. Next, the default error margin of 25 should be fine. Type in 25 and click Enter again. The next question lets you tune a custom gap length between signals. Leave it blank and click Enter again. Next you'll be asked to press a button. Just follow the prompts. Don't worry about which buttons you're pressing. WinLIRC is just checking out the signal timing you're sending it until it asks for the name of a button.
When asked for a name, enter something like Power and click enter. Now you'll be asked to hold down the button. Aim the remote at your receiver and watch the signal count rise.
Finally, you get to declare if you want to keep the recording of each button. Repeat this for every button on the remote you wish to store. When you're done, click Enter without typing anything in the box. You should get a confirmation message that the config was saved.
More WinLIRC silliness. Just click OK, then click the Analyze button back in the main config window. If you're done, click OK in the main configuration window. Now WinLIRC will hide in the TaskBar as an icon. The icon will change colors to show status. It turns green if it gets a signal it recognizes.
Clicking on the icon will bring up a WinLIRC window. To test sending a code you've recorded, select the remote and the code you want, and click Send Code. You'll need to aim the transmitter at whatever you want it to talk to.
Now that it's working, you'll want to make it do something besides make a green dot on your task bar. On the
WinLIRC page you'll find links to various pieces of software that supports WinLIRC. Go forth and vanquish TV signals, friend, or whatever unusual things one does with a fully customizeable homebrew IR blaster / receiver.
I have tried this and it works perfectly!
I redrew the circuit design for my own better understanding of it. This puts me one step closer to my computer controlled room! My computer controls my TV and the satellite receiver and anything I may add like my DVD player. This allows me to have a computer remote and I push a button then it controls whatever device I want. I can have some things like the play, stop, channel up, channel down, etc control the satellite DVR and the number buttons control the tv. Or I can make 0-9 control programs on my computer. If you know any programming and can connect through TCP/IP with the programming language you know and you can customize what to do with the received commands.!
http://winlirc.sourceforge.net/developer.html has more information.
I now really have a universal remote and I wont stop there, my computer will be able to control my tv when I send it a text message! Thank you for the circuit information Will O`Brien, I had tried a few others I found and they did not work. But this worked really well!
Do anybody knows if winlirc can be used from visual basic or other programming language? please if you have information it will be great
how to link the ir to comtroll opening and closing of directories(Like My computer; varios drives C,D,E etc) in windows os????
Yes you can and it is rather easy to do. Here are some vb6 examples on pscode.com
http://pscode.com/vb/scripts/ShowCode.asp?txtCodeId=55429&lngWId=1
http://pscode.com/vb/scripts/ShowCode.asp?txtCodeId=48563&lngWId=1
Basically you just connect to the server and it sends winsock data whenever a button is pressed.
http://winlirc.sourceforge.net/developer.html has more information.
You can also send data as one of the examples show, hope this helps!
I created this devices but it always tells me that the signal is not consistent.
I use a IR001T5 as receiver it should filter 38 kHz. I even tried to make the 4K7ohm smaller to 1kohm in order to have a higher voltage 4.2 instead of 2.6 on the signal pi of the receiver. On the oscilloscope I see some data coming in.
I tried several remote controls but non work
Any ideas? Is the receiver the problem?
I just built it. Only the receiver part, because I don't need to control anything from my PC. I encased it all in an attachable Ethernet socket (the kind you use for structured cabling). It looks good, and it works with a USB2Serial adapter from STLab. The adapter is around 10Euro or $12. The components for the receiver were scavenged from an old HP Photosmart 8886 Docking Station, plus a 4k7 resistor from a friend (thanks Dan), and I use the HP remote that came with the docking station.
In WinLirc I receive signals from the remote, however they don't seem to be consistent enough for the program to learn them. I also tried my Air Conditioning remote, and I have the same problem.
Anyway, now that I have the receiver, it's just a software problem.
I'll try tomorrow with a PC, since now I'm using my notebook (hence the usb2serial adapter) and I expect better results.
I'll post the results of the second experiment tomorrow.
Thanks for filling up my Sunday.
How can you get WinLIRC to work if there is no COM port associated with a hardware IRDA device? I've plugged in a Vista compatible IRDA adapter, the KingSun KS-959 and it appears in the Vista control panel with a lovely icon, yet there seems to be no actual com port associated with it when looking at the device properties.
So obviously when starting the software up, I haven't a clue how to associate the device with the relevant com port.
i wish itunes or wmp worked with winlirc. The sexy thing is: Amarok works with lirc, so try to guess the OS i use most often, and the stupid reason why.
Or you could just buy a new Mac.
iTunes can be scripted (with COM I believe?) so theoretically you could write scripts to trigger iTunes events from LIRC. Unless it works differently than I imagine (I'm a Mac user).
Speaking of Mac users, I'd looove to see a how-to on building an all-USB version of this. I've been wanting to turn my old G4 tower into a Front Row box for a long time. Would that be difficult?
I have Windows Media Center 2005. Screw this.
im confused
what do you use as the remote?
or you could buy a keyspan USB remote on eBay for $30.
I think you can use any remote.
like i can use my tv remote?
and then why is there a reciever and a transmitter
Wait a minute, this requires a serial port! I bet half the kids who read this don't even know what one of those is :D
You can use any remote, even some universal remotes. I'm actually using a (discontinued) Sony Liv remote that Walmart sells and I've pretty much been able to use almost all of it's buttons. It's just a matter of the receiver being able to read the remote's commands.
Anyway, what do you use the transmitter part for? controlling a TV maybe? I've never really thought of a good use for the transmitter part.
how is hooked up through cat5?
You can use the transmitter to control anything that receives commands from an IR remote. Think home automation or media center with a remote cable box or something along those lines.
To 8.
Actually we use those in Botball. Its more like "Half of the kids who read this don't even have a serial prt"
so if u just want it to control the computer you only have to build the reciever??
14: Yup, it's modular. I built both so I can use the PC to turn on and off my CRT projector.
to 9 and 13, I make DAMN sure every computer I build has a serial, and I have a USB to Serial Adaptor for just such occasions when my two ports arent enough ThankYouVeryMuch
I drew up the schematics for the whole unit to run on serial NO USB. I just made one today and it works. Use winlirc with the software.
http://rapidshare.de/files/20652268/PCB_Wizard_-_Professional_Edition_-_Serial_IR.pdf.html
PDF FORMAT
To 9, Serial ports sre still standard for me, i still have a 2 button Wingman that uses a Serial, its my pride and joy to say that i still use Serial ports.
@ 3. it's pretty simple to do a usb version...all you need is a usb-to-serial cable...this will give you a serial port on your mac which you can connect to no problems...i'm thinking of doing similar as i'd like my mac to be able to send signals and i'd like a bit more functionality than front row provides....just need to see if a port of lirc (or something similar) is available for osx
no 9 is right, many new computers dont have a com port built in.
my dell I9400 dosnt have one either. (not even an LPT)
how do we use a usb port instead?
Tim Pope,
could i safely say the USB wires (yellow & blue) corresponds with the D9 pin 3 (txd) and pin 4 (dtr) along with the power?
would it simply work if i did this & add a port in the device manager settings?
now if it had actually been done through the enthernet... that would have been interestin... otherwise, there are thousands of pages with this info on the net.
Just drop one of these suckers in there and you've got a USB version:
http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=38&title=UM232R
Evinyatar,
im looking for a simple approach, if you have any links that I could bridge usb-serial using cheap electronics, please let me know.
Im trying to build a prototype UI for the disabled,
thanks in advance.
Just a warning. WinLIRC will not work with a USB serial bridge of any sort. It does a fair amount of low level stuff that just isn't available over USB.
#17 Could you upload the pdf again as I cant access.
Thanks
what voltage are those caps?
They are 25v. - I meant it when I said digging around in the parts bin. I used what I had on-hand.
25 volt? Can I get away with using 6 and 10 volt caps or do you think I might blow them up?
Amazingly, the commenters appear to be rather unfamiliar with the whole A/V HT/HA market.
Do you know how much most retail IR Receivers cost? Most are around $100 and up.
This is a very interesting market...and this is a very poor writeup.
Please you can tell me how to make Serial connector with USB
This is looks fairly promising, I've bought all the parts from Radio Shack (though I'm a bit worried that I won't need all of them if I don't need the transmitter, but they weren't *too* expensive at least). I don't really know how to decipher the charts but will try, and I'm not sure where the ethernet thing comes in, etc... This is such neat information and a neat project, I hope that you might consider posting something with just a smidge more detail at some point for the building portion, at least addressing the aforementioned concerns -- that'd be awesome. Thank you for your verbosity with the WinLIRC part. Here's hoping that it works! :-)
it works! (many thanks to an electrical engineering friend who could read the charts) ... i'm wondering though if anyone has had particular luck with universal remotes programmed to certain TV/VCR codes... the results seem pretty varied and so far i haven't been able to find any codes that work for all the desired buttons (channel up/down might work while volume up/down doesn't, for example) if anyone has any input about that, i'd be curious to know... thanks!
is this circuit really works?bcoz when i am going through most of the ir receivers to control pc almost most of them use any controller or atmel processors.here no such thing s are used.so i had this doubt.pls reply me soon. i am eager to automate my room using this ckt
i want to know is this ckt really works?
yes ganesh it worked
FYI everyone i just tried the first Sony code for this Philips Universal remote and all but one button registered just fine!
is this circuit really works?bcoz when i am going through most of the ir receivers to control pc almost most of them use any controller or atmel processors.here no such thing s are used.so i had this doubt.pls reply me soon. i am eager to automate my room using this ckt
i want to control my computer using a tool like remote for computer how to do it, if there is any way.
please let me know abt the setup.
Regards,
Bharathi.
downlod girder from http://www.promixis.com/. works great with any remote contol and the ir receiver. I have tried it and works well :)
...or, use the IR header that's already on your motherboard.
...or, buy one of these: http://usb.brando.com.hk/prod_detail.php?prod_id=00016&dept_id=015&cat_id=036
Sorry for stupid question... why use USB for 5v supply? Isn't easier to use 5v (or std 9V) battery? Cheaper & easier than sacrificing USB cable?
Or must the Vs come from m/board?
Why use the transmitter? I can think of lotsa reasons, if the receiver/program is good at saving the IR signals. Robosapiens & V2 works on IR :-) so should be able to now have pc control.
Anybody got more info on VB6 to control the transmitter to send the saved IR signals?
can someone please remake the schematic, this is hard for me to comprehend
nice and easy looking. Really interested in the usb ver you are talking about. Could you please explain further by email?
I am very interesting in the LAN version and like create one, but could you send me or post a circuit map (like the USB or serial Version)? Thanks a lot.
So.. I build it and.. it doesn't work ;/ I don't know which IR receiver I'm using (I got it from old satellite tunner) I know that this ir receiver works, because when I'm conecting an led into pin 1 and 3 of ir receiver and I push any button on remote it flash... What I'm doing wrong?
if you put a led between the +5 an out put (+leg on +5v an neg leg on output of reciver ie db1) it will work like a activity light. (good for trouble shoooting) :) i don't have a serial port on my comp either... any one kno a prog like WinLirc that has LPT capabilies...
oh and make sure it is series with a resistor like a 220 ohm or something bigger...
how do use an inbuilt infrared reciever with a remote or removable ones like kinsguns infrared adapter
This is very similar to a project I worked on recently, except we used radio frequency instead of infrared (for longer range). After considerable research, we decided on these parts for the rf functionality..
this one for the longer range rf (tx/rx):
http://linxtechnologies.com/Products/RF-Modules/LR-Series-Long-Range-Wireless-Communication-Modules/
this for the encryption of the wireless signal (enc/dec)
http://linxtechnologies.com/Products/Integrated-Circuits/HS-Series-High-Security-Encrypted-Remote-Control-Encoder-and-Decoder/
and this for the usb connection to the computer.
http://linxtechnologies.com/Products/Interface-Modules/QS-Series-USB-Module/
I hope this is of use to others in the same phase of development.
evryone think oteside the box. you have to think inside, use the 5volt from the psu the red wire is 5+ yellow is 12+ black is ground 0- and the contact locks licke this [oooo]
ummm... why do the finished pic look like a lan cable? oh and the stupid "designed for window xp pro" work with it's own dongle!? I am going to have to go to radioshac and buy the parts. I mainly use my computer as a jukebox and wanted to use a remote. I hope this works.
----------------------------------------------------
Hacking your reality, one person at a time.
Enlist in Dr. Steel's army of toy soldgers. Build a Utopian Playground... one park at a time.
----------------------------------------------------