Basically it does this:

  1. Lies in wait until it detects a remote control signal.
  2. Records the signal and waits for 30 seconds.
  3. Resends the signal.
  4. Plays a delightful little tune you may have heard before.

Why is that so annoying? Imagine sitting down to watch some TV. You hit the power button on your remote. 30 seconds later the TV unexpectedly turns off. As if that weren't enough, you then have the opportunity to hear a short, square-wave rendition of your favorite song. Here's a video of it in action.

So you want to make one? Here's a schematic. The parts you need are in the components section.

But wait! Before you go putting it all together, remember that you have to be able to program the thing. This hardware setup is not programmer friendly, so make sure you have the program on the chip before soldering it all. I soldered the chip onto the breakout board, programmed it, then put the rest on. 

Writing the code presented a variety of challenges. I repeatedly went over the 1024 byte limit and had to optimize things a bit. Also, with only 32 bytes of ram I had to be very careful. I ended up using 22 of those bytes to hold the timing and sequence information for the IR signal. The stack didn't use more than 8 bytes anywhere, which left me with 2 extra peace of mind bytes.

The assembly code is included in the files section. It is easy to change the tune or delay intervals, but you will have to dig your way through the code to do so. Some things to note are:

- The tiny10 goes into power-down sleep mode while it waits, so it won't burn through your battery.

- It will record up to 64 bits plus a header pulse as long as nothing is longer than about 12ms. This covers any of the common remote protocols, as far as I know.

- It records four timing values: header on, header off, long on, short on, long off, short off.