loading

Hello everyone. This is my first Instructable.

A while ago I got to know about the FLIRC IR receiver which I thought of buying. But I thought, Hey! Why buy something I can make at home.

So basically what FLIRC do is convert IR signals received from any remote to HID signals. From what I gathered, it recognizes as an HID keyboard to the computer.

Now, to the project, we can do this using two ways.

-Easy way.

-Fun way.

Easy way would be to use and arduino Leonardo compatible board which can easily made to be recognized as an HID keyboard or mouse to the computer. There is even an IR library to easily decode IR signals from the remote. But let’s be real here, you cannot use a development oriented board to create something to be used on a daily basis. Plus there are similar projects already available. Also it will be WAY too bulky. Even if you use the tiniest Leonardo compatible board. So, we move on to the fun way.

For this project, I used a PIC18F25J50 microcontroller with a TSOP IR decoder. I used this microcontroller because of three reasons. First, this mcu is available in tiny QFN package which helps reducing the overall board size. Second, this mcu supports usb communication without using an external crystal/resonator which again helps reducing the board size. And third, is that I have several of these laying around in my stock. The list of components required to make this project is very tiny. Hence it’s not very hard to build this circuit. But, if you want to build the circuit I built, you’ll need very steady hands and expert soldering skills.

Step 1: Components Required

-PIC18F25J50 (You can also use other PIC18F MCUs with USB transceiver built-in but you may have to make appropriate changes to the code and the schematics. You can comment below if you need my help doing so.)

-TSOP IR receiver.

-LM1117 3.3v regulator

-2x220nf capacitors.

-470 ohm resistance.

-10k ohm resistance.

As I said, the list of components is tiny.

Step 2: Schematics and PCB Layout

To make the PCB i used the simple Toner transfer method using a simple iron. As you can see, the quality is decent except sometimes the 0.01 inch traces gets scraped off by using steel wool no matter how careful i get with it.

To cut the PCB to size, I mainly used a box cutter to carve out the shape. (I also got my right thumb severely cut in the process.)

After carving the shape, i drilled necessary holes using a 0.5 mm drill bit. Then there was just a matter of soldering the components on the board. which requires a lot of patience since it's a QFN chip and i don't have a hot air soldering station. But anyways, I got it to work in the first try..

For later, I've designed a double layer PCB which is more than 40% smaller.

You can also refer to the project folder to these images... I've also included Eagle-CAD files

Step 3: PIC Firmware and the Final Product.

I used MikroC pro for PIC to build the firmware. Source code is attached in the project zip file. There is precompiled Hex file that you can burn to the chip using PICKIT2 or any other pic programmer.

Note that you’ll need the registered version of the MikroC pro for pic IDE to compile the project as you cannot compile a code larger than 2000 words in the demo version. But I’m sure you guys can figure that out on your own.

Alternatively, you can convert the code to MPlabX (please send me the project folder if you do).

I’ve used IR remote decoder example code from this link. HERE

I’ve slightly modified the code to trigger the decoding process using an external Interrupt pin so the program don’t need to constantly check whether any data is received from the IR decoder. It also reduces the lag.

In this project, I’ve used a NEC remote. Because it’s easiest to decode. You can refer to the project code for more info on that.

To decode the ir code sent by your remote, You can use UART to send the integer value inside ir_result[2] variable(in case of NEC remote). I used UART_remappable module mapped Tx and Rx pins to RB6 and RB7 respectively (ie. PGD and PGC pins used to program the chip) so I can use the PICKIT2’s UART feature to receive serial data without connecting any other usb to serial converter to the board. (Do I need to elaborate this?)

You can also refer to the IR remote decoder example code I’ve linked above. To get help decoding your remote.

Limitations:

1. As of now you can’t remap the keys. However I’m planning to do this sometime later.

2. Current Code cannot decode RAW ir data. Hence only known IR remotes are supported like sony, NEC, RC5 etc.

Feel free to ask any questions. And do share your experience if you decide to do this project.

Cheers!

<p>Congrats :) You cracked me.</p><p>As the father sth like that was Igor Cesko AVR309 (2003).</p><p>http://cesko.ddns.net/hostsk/IgorPlugUSB/IgorPlug-...</p><p><a href="http://www.tuxgraphics.org/common/src2/article08101/avr309.pdf" rel="nofollow">http://www.tuxgraphics.org/common/src2/article0810...</a></p><p>Here you got a hardware USB service. Hi did own software implemented USB 1.1 LS protocol by cycle exact assembler routine on 12MHZ clock.</p><p>Also hi wrote own WDM driver in DDK.</p><p>Ergh... times goes by so fast. Today any cheap chip can have OTG.</p><p>Nice job mate.</p>
<p>Wow, really impressive (especially as a first project!), also very useful!<br>I just wanted to add, for those of you who use Linux, that you can also buy a cheap (&lt;8&euro;) DVBT stick, most of which also come with a remote and IR receiver. You can also assign commands to those remote keys.</p>
thanks! But this is my first project on instructables.. not THE first project I've done..<br><br>why I don't usually upload projects is that I don't record the progress of the project because I'm not certain that I'll finish it... even now I have about 5-6 projects waiting to be finished. also, I'm a lazy potato.<br><br>also dvb-t receivers are TV receivers.. they cannot control your computer. I have one for my laptop.... <br><br>thanks again!
Oh, okay, I see.<br>Actually there are loads of DVBT sticks around with IR remotes [eg. http://www.ebay.de/itm/131762211211 ] for most of them, you can reconfigure the commands send to the computer (at least under Linux).
Love it. <br>Awesome!
thanks.. :)
<p>Thumbs up for using a PIC (vs shitduino) and thumbs up for using Eagle. Love this project. Thanks.</p>
thanks :) <br><br>but why so such hate for arduino?
Good one....keep it up...
<p>Very nice design.</p><p>I already have a few of these for my Raspberry Pi farm.</p><p>:-)</p>
<p>u should sell these the cheapest one i can find is 20 bucks</p>
I would love to sell these. but the problem is the international courier from my country would exceed 15+ dollars.. I board however took no more than 5$ for me.
<p>I will vote it to have one, too. If not able to find any party to do it, I might be able to arrange to do it here in Taiwan. </p>
<p>If you can find enough people that want them, it's possible to ship these in bulk, being so small, to someone local to leverage as a distributor. As long as you aren't breaking any trade laws....</p>
<p>Nice almost-single-layer design!</p><p>I try to avoid the LM1117 in new desings as the datasheet specifys <br>using at least 2x 10uF tantalum capacitors which are rather bulky. Lucky you for getting it working without them :). My personal favorite LDO for low voltage (&lt;5.5V), low power, digital designs is the XC6206 series by torrex. They are in SOT23 packages, draw less then 10uA quiescent current, require only 2x 1uF X5R capacitors for operation and cost only a few cents on aliexpress.</p><p>Apart from that this is pretty close to a perfect design, I curious what you come up next with!</p>
I'm aware that lm1117 requires 2 tantalum caps...I mainly skipped them because there was lack of space on the board.. also I used lm1117 because I had a few of these laying around... <br><br>I'll look into the regulator you mentioned. thank .. :)<br><br>PS. if I start manufacturing these boards I'll definitely use smaller regulator.... and since I can use double PCBs ...the overall board size will also decrease.
<p>Voted.</p>
<p>Good One</p>
well done!
thank you :)
<p>id gladly buy one for 10</p>
<p>pretty nice presentation some times i use old phone dial keyb or I designe from the scratch using aluminium foil layer and cardboard</p>
<p>Good instructable :) Thanks for sharing!</p>

About This Instructable

20,932views

259favorites

License:

Bio: Hi! My name is Suraj. I'm a DIY electronics enthusiast who loves to make circuits and stuff.
More by Suraj Bhawal:Minimal Arduino UNO (a.k.a. Arduino Pro) Understanding IR protocol of Air Conditoner's remotes DIY Media Center Remote 
Add instructable to: