loading

Hello makers!
this is an instructable to build a working USB IR receiver using an Attiny85 microcontroller.
I started this project to overcome the lack of support (at least complete support) for some IR remotes in the GNU/Linux OS. Following this instructions you could build a programmable USB IR receiver that works with any IR remote for a few bucks.

First of all, this instructable wouldn't exists without the hard work of the people that created the libraries that I use here:

Sometimes is not easy to find the right owner of a library, so in case I made a mistake, please leave a comment and I would solve the issue ASAP.

This guide exists because I didn't find a complete tutorial/guide working out of the box (it may exist, but I couldn't find it) so I gathered all the info available on the web and after a good amount of trials and errors I came up with a complete guide to build a working USB IR receiver that actually works pretty well.

The main sources of information that I have followed:

Step 1: Some Considerations

    • I don't own an AVR ISP programmer and I don't really fancy buying one so I have used an Arduino to program the attiny85
    • I don't care about any other OS than GNU/Linux so I don't know if this is gonna work otherwise.
    • there are other IR libraries but I couldn't make them work not even with an arduino. Consider though that I started with a limited knowledge about IR libraries. Maybe I could make them work now after the experience acquired dealing with a fair amount of issues. Anyway, I was lost and desperate before finding the library that Seejaydee provided and I have used that ever since (many thanks man!).
    • There are other hardware configurations, but I have only used the one that uses 5V to power the attiny85 and two 3.6V 0.5W zener diodes to clamp the voltage of the data lines, it works out of the box so I didn't mess with other configurations.
    • You can use a 16Mhz crystal or you can use the tinytuner library to calibrate the internal clock of your attiny85. I strongly advice the use of the crystal, it's much more stable and probably will spare you a lot of headaches.
    • I'm using here two different bootloaders for the attiny85:

    a) Rowdy Dog Software version, it has integrated a serial interface that is very cool and is very small so you have more space for your program and other libraries. The problem is that for some reasons even though it works pretty well, after some time the usb device got disconnected (you can find the issues with the command dmesg). I don't know if this is a problem of the core or a mixed combination of the core plus the chosen libraries so after a while I decided to use this core just to decode the remote keys and calibrate the clock (when not using a 16Mhz crystal). After that, I just burn the Mellis bootloader and upload the definitive sketch that doesn't use the serial interface.

    b) Mellis version, stable bootloader, I have used this in many projects. I would've used this bootloader always if it had included a serial interface. I use this core in the final sketch after decoding all the keys on my remotes.

    <p>I have added further information regarding the usb to serial adapter connections:</p><p>The bootloader <strong>&quot;ATtiny85 @ 8MHz (internal oscillator;BOD disabled)&quot;)</strong> needs a different pin configuration:</p><p>PB4 (pin3--&gt; RX) to TX in the FT232RL attiny85<br>PB3 (pin2--&gt; TX) to RX in the FT232RL attiny85</p><p>Notice that the other bootloaders use:</p><p>PB0 (pin5--&gt; RX) to TX in the FT232RL attiny85<br>PB2 (pin7--&gt; TX) to RX in the FT232RL attiny85</p><p>Anyway, if you use the crystal, don't bother as we use this bootloader only for calibration purposes.</p>
    <p>This is great! Thanks for sharing your receiver! </p>

    About This Instructable

    2,861views

    52favorites

    More by venumz:ATtiny85 IR USB Receiver 
    Add instructable to: