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

IR-transmitter with an AVR processor ATtiny45

  1. Properties of the remote control
  2. Hardware and how it works
  3. Building the remote control
  4. Software


This remote control project offers the following opportunities:

Hardware and how it works

The schematic of the remote control:
Scheme transmitter In the center a processor of the type ATtiny45 was selected because it can be clocked with an Xtal (here: 2.4576 MHz). The clock fuse has to be set to an external Xtal with medium frequency. Derived from this Xtal is the modulation frequency of the IR LED LD271 at 38.4 MHz, but that frequency can be configured between 36 and 40 kHz by software.

The IR LED LD271 is not driven directly by a portpin but with a constant current source. This is built with two diodes, the power transistor BD439 and its emitter resistor and is set at 93 mA (= 0,7 V / 7,5 Ω). So, the operating voltage can be between 2,7 and 5 V without current changes and destroying the LED.

Voltage supply is with two batteries or accus, the power switch is not displayed here.

The processor programming signals SCK, MISO, MOSI and RESET are tied to a standard 10-pin ISP connector so that the whole remote control can be re-programmed. When re-programming via the Studio and a STK500 the battery supply should be switched off, the supply should come from the STK500 and VTG should be adjusted to 3 V. For correct function, the ISP connection should be removed after programming, because it interferes with the AD converter, and battery supply switched on.

Not displayed here is a red LED that displays start and end of the transmission sequence. This should be connected to MISO and via a 220 Ω to the positive operating voltage (output is active low).

Matrix voltages On the input ADC1 of the processor the keypad is connected. The keypad produces an analogue voltage, depending from the key pressed. The matrix is dimensioned for commercially available resistors with 5% accuracy, for 8 bit resolution of the ADC and an as-linear-as-possible response curve. The calculation of the resistors was done with a calculation sheet in Open-Office-Format or as Excel sheet.

To the top of page, To the IR title page


Box Electronics, batteries, keypad, resistor matrix and the two LEDs fit well into a small plastic box ...

Built in ... the mounting of the single parts ...

Processor ... the processor part ...

Resistor matrix ... and the resistor matrix in detail.

To the top of page, To the IR title page


The assembler source code is available in HTML-Format here or as Assembler source file here.

The program works without timer, the timing of the signals is controlled with exact counter loops. All transmit loops are 64 clock cycles long, with a cycle duration of 26,04 µs. Only the AD conversion is interrupt controlled, and switched off during transmission.

The tables are organised as follows:

To the top of page, To the IR title page

©2011-2022 by