Path: Home => AVR-overview => Applications => IR Remote Control => Receiver for remote control signals    (Diese Seite in Deutsch: Flag DE) Logo

IR receiver for switching and volume control with AVR processor ATtiny13

Do you have an old amplifier, that came without an IR remote control? You don't want to put it to the waste bin, because it worked now for 25 years, and modern amplifiers just do the same thing (amplifying analogue signals and moving speaker membranes in and out). To not being urged by this device to leave your sofa, because some commercial TV stations increase their volume each time they bring urgent PR messages to you, this is your next do-it-yourself project. It brings your oldtimer to the hypermodern world. And, the best is: you don't need an additional box extra for this, but it works with all your remote controllers, if you program it that way. And all that without even opening your oldtimer's top.
  1. Properties,
  2. Hardware, how it works,
  3. Construction,
  4. Software.


This page describes an IR remote control receiver with an ATtiny13 that switches the power of a connected device on and off and controls the volume of an audio source. The device has the following functions:

To the top of page, To the IR title page

Hardware, how it works

The hardware is shown in the schematic. The single modules power supply, relais switch, microcontroller and analog volume control are marked separately.

Schematic IR switch and volume control

Power supply

The power supply provides 12 V for the relais and regulated 5 V for the processor and the analogue unit. The low current requires a 1 VA transformer only. The standby consumption is dominated by the transformer and the LED, and is very low.

Relais switch unit

The 12 V-relais is driven with a transaistor and switches 240 V/8 A load.

MC unit

The microcontroller ATtiny13 runs with its internal RC generator of 1.2 MHz, without any problems with timing. For receiving the IR signals, a commercially available IR receiver type TSOP1738 from Vishay/Telefunken is attached to port PB0. A Siemens SFH507 oder Infineon SFH5110/5111 can probably used instead.
To drive the relais PB2 is configured as output.
PB1 is output for driving the green LED (when debugging this displays the received signals) and inputs the key signal. The key switches the box on without the remote control.
With PB3, PB4 and PB1 the processor controls the digital potentiometers in the analog part.
For programming the AVR a standard 10-pole ISP interface is attached. When connected, the IR receive signal isn't detected. So remove the ISP10 line after programming.

Analogue control

For controlling the analogue signal a commercially available MCP42010MIC with two digital channels is used. The audio signals are decoupled with condensers from DC. Volume control is managed by the processor for both channels. The volume curve has 54 stages, with an exponential curve, to ease control.
Volume curve The exponential curve in the table for volume control.

To the top of page, To the IR title page


The whole electronic is on a breadboard and built in a plastic box.
Box from above The 240 V output and the connectors for the analogue I/O are mounted on top of the box.

Front of the box On the front the IR receiver, the two LEDs and the key are visible.

To the top of page, To the IR title page


The commented assembler source code is available in HTML-Format here and in Assembler source code format here.

The machine code In case the debug mode is enabled before assembling, the LED displays the received command code in decimal form.

Required modifications for the source code are e. g. Finally: the box works here very well over some monthes.

To the top of page, To the IR title page

©2011 by