IR Signal Duplicator

by: austin on July 24th, 2010

categories: AVR, Main Projects

This AVR based project was built to replicate infrared (IR) signals sent from a remote. Basically it’s my attempt to create a simple universal remote. Though I tried to keep it simple, I still haven’t successfully replicated any signals and I don’t have the proper equipment (an oscilloscope / digital analyzer). Once I get to college, I’ll have the equipment available and will get back to this project as soon as I can.


A TV remote sends out a signal according to the button pressed.  The signal is a series of 0′s and 1′s carried by a 38 kHz square wave.  A 38 kHz IR detector connected to my circuit receives the signal and outputs it to the INT0 pin on the ATiny861 microcontroller (mcu).  Once the 38 kHz receiver detects a 38 kHz IR signal, the INTO pin of ATiny861 is pulled low.  An interrupt is triggered and the ATtiny861 “listens” to the incoming signal.  The ATtiny861 stores the incoming signal in an array of unsigned integers.  Each element in the array contains the time (in clock cycles) from one edge change to the next.  (An edge change is when the IR signal changes from a 1 to a 0 or from a 0 to a 1)  The array contains the data representing the signal once the signal is done transmitting.  The signal can now be replicated through a IR LED attached to the circuit using the elements in the array.  Timer0 is initialized to make use of the times that represent the successive edges of the signal.  When timer0 equals the value in the array element, an interrupt is triggered.  The interrupt vector routine resets timer0, increments the comparative value in the array, and inverts the signal on the IR LED.  This routine is repeated until all of the data in the array has been sent out.  All of the technical details have been left out but can be seen in the source code and schematic which can be downloaded below.


Downloads

Source Files – IR_Control.zip


Schematic

3 Comments for this entry

  • Robby Weinberg

    How do you come up with all this content so quick? Impressive. I am almost done with my first non-tutorial AVR project… a hall effect sensor tachometer that Im gonna put on a bike or my scooter or something that will function as a speedometer.

    Good stuff.

  • roy cohen

    i have replicated the signal using an arduino and im pretty sure i know what the problem is, it could be the fact that when u recive signals from the digital IR reciver it gives you only the digital pulses the main ones that represent on and off but when transmiting and you use an IR led you have to also pulse the led at 38 khz or whatever frequency you use while the pin is at high

  • Don Z.

    You’ve probably already considered this, but not all remotes transmit at 38kHz.

    Check out this site for a ton of information on the topic.
    http://www.ladyada.net/make/tvbgone/design.html

Leave a Reply

DONATE

You can help bring my projects to life by clicking the button below. Thanks to all that do.