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
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.
Reader Comments (Page 1 of 2)
fucter @ May 16th 2006 6:30PM
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.
David Fine @ May 16th 2006 6:47PM
Or you could just buy a new Mac.
d chalmers @ May 16th 2006 6:56PM
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?
LongshotX @ May 16th 2006 7:02PM
I have Windows Media Center 2005. Screw this.
ed @ May 16th 2006 7:32PM
im confused
what do you use as the remote?
DAN @ May 16th 2006 7:33PM
or you could buy a keyspan USB remote on eBay for $30.
Aidan @ May 16th 2006 7:48PM
I think you can use any remote.
ed @ May 16th 2006 7:49PM
like i can use my tv remote?
and then why is there a reciever and a transmitter
Eli @ May 16th 2006 7:52PM
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
x24 @ May 16th 2006 7:56PM
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.
ed @ May 16th 2006 7:59PM
how is hooked up through cat5?
Honig @ May 16th 2006 8:06PM
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.
Amir @ May 16th 2006 8:08PM
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"
ed @ May 16th 2006 8:09PM
so if u just want it to control the computer you only have to build the reciever??
Will O'Brien @ May 16th 2006 9:01PM
14: Yup, it's modular. I built both so I can use the PC to turn on and off my CRT projector.
Andrew @ May 16th 2006 10:59PM
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
Sski @ May 16th 2006 11:35PM
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
Hap @ May 17th 2006 1:54AM
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.
Tim Pope @ May 17th 2006 2:47AM
@ 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
Gunesh Raj @ May 17th 2006 3:20AM
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?
Gunesh Raj @ May 17th 2006 3:50AM
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?
mark @ May 17th 2006 4:01AM
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.
Evinyatar @ May 17th 2006 4:26AM
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
Gunesh Raj @ May 17th 2006 10:17AM
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.
Arvid @ May 17th 2006 10:36AM
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.
Richard Sum @ May 17th 2006 12:43PM
#17 Could you upload the pdf again as I cant access.
Thanks
john @ May 18th 2006 12:34PM
what voltage are those caps?
Will O'Brien @ May 18th 2006 12:53PM
They are 25v. - I meant it when I said digging around in the parts bin. I used what I had on-hand.
john @ May 18th 2006 4:21PM
25 volt? Can I get away with using 6 and 10 volt caps or do you think I might blow them up?
eufreka @ May 18th 2006 4:35PM
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.
minhtien @ Jun 26th 2006 12:10AM
Please you can tell me how to make Serial connector with USB
bharathi @ Sep 28th 2006 2:21AM
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.
santosh @ Oct 20th 2006 12:15PM
downlod girder from http://www.promixis.com/. works great with any remote contol and the ir receiver. I have tried it and works well :)
LeftyX @ Dec 26th 2006 9:45PM
...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
MoJo123 @ Jan 10th 2007 11:54PM
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?
MoJo123 @ Jan 11th 2007 12:14AM
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?
Tpritch6 @ Jan 13th 2007 5:50PM
can someone please remake the schematic, this is hard for me to comprehend
litaninja @ Feb 2nd 2007 1:50PM
nice and easy looking. Really interested in the usb ver you are talking about. Could you please explain further by email?
fuwuyie @ Feb 12th 2007 11:06AM
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.
Aaron @ Mar 16th 2007 8:56AM
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...
Aaron @ Mar 16th 2007 9:03AM
oh and make sure it is series with a resistor like a 220 ohm or something bigger...
hilsong2 @ Mar 22nd 2007 10:52AM
how do use an inbuilt infrared reciever with a remote or removable ones like kinsguns infrared adapter
Dewastator @ Mar 24th 2007 1:46PM
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?
rfengine @ Apr 16th 2007 2:36PM
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.
SA4AQS @ Aug 7th 2007 8:45AM
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]
hacker X-13 @ Nov 13th 2007 9:18PM
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.
----------------------------------------------------
ComputerGuru @ Mar 24th 2008 2:58PM
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!
chelo @ May 22nd 2008 3:25PM
Do anybody knows if winlirc can be used from visual basic or other programming language? please if you have information it will be great
dewang @ Mar 27th 2008 12:57AM
how to link the ir to comtroll opening and closing of directories(Like My computer; varios drives C,D,E etc) in windows os????
ComputerGuru @ May 23rd 2008 2:50AM
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!