Path: Home => AVR-overview => IR Remote Control => Analysing remote control signals IR-Transmitter

Analysis of IR remote control signals


Software

The software for analysing the measured data is written in Pascal. The compiled executable can be downloded here. After unpacking, the exe file can be started.
Opening measuring file By clicking into the field "File" a file selection dialog opens and you can navigate to the log file that was created during measuring a remote control. The data measured appears in the left data window.
By pushing the button "Analyze" the analysis of the data is started. In the second data window all keys that were found in the data stream are listed (recognized by lines with "key="). The example shows a camera remote control with nine keys. When clicking on a listed key in the second window, the data for that key is listed in the third window. Here, a "1:" lists an active IR-LED, "0:" an inactive. The duration of the signal is given in Microseconds.

By analysing the data all measured signal durations of all keys in the data stream are categorized and for all categories of signals mean values are calculated to avoid inaccuracies.

To the top of page, To the IR title page

Transmit data

If in the selection field "Cycles" the mode "TX" is selected, the signal durations are recalculated with multiples of the duration that was selected in the window under "TX options". These options select the modulation frequency of the LED signal (in the example 38.4 kHz). By pressing the button "Create table" all keys of the remote control are analysed and converted to a table in the window "Assembler tables".
Transmit table The table lists the first 150 signals of each key in the form of a .db table. This table is designed as follows. The first byte selects the number of repeats of the sequence. The constant "cH" says that this is an active signal, which means that the IR LED is switched on in the first part of the signal. The constant "cHW" selects 16 bits for the following two durations. The constant without W, "cH", selects 8 bit wide values. The following two, resp. four, bytes select the duration of the active (LED on) and the inactive (LED off) cycle.

The following lines are extracted from such a transmit table for the key "Off" of a remote control.

key_off:
.db 1+cHW,low(350),high(350),low(168),high(168),2+cH,26,60
.db 1+cH,26,17,1+cH,26,60,2+cH,26,17,2+cH,26,60
.db 4+cH,26,17,2+cH,26,60,2+cH,26,17,1+cH,26,60
.db 6+cH,26,17,1+cH,26,60,1+cH,26,17,6+cH,26,60
.db 1+cH,26,17,1+cHW,low(26),high(26),low(1571),high(1571)
.db 1+cHW,low(350),high(350),low(82),high(82),1+cHW,low(26),high(26),low(3686),high(3686)
.db 1+cHW,low(350),high(350),low(82),high(82),1+cHW,low(26),high(26),low(3686),high(3686)
.db 1+cHW,low(350),high(350),low(82),high(82),1+cHW,low(26),high(26),low(3686),high(3686)
.db 1+cHW,low(350),high(350),low(82),high(82),1+cHW,low(26),high(26),low(3686),high(3686)
.db 1+cHW,low(350),high(350),low(82),high(82),1+cHW,low(26),high(26),low(3686),high(3686)
.db 1+cHW,low(350),high(350),low(82),high(82),1+cHW,low(26),high(26),low(3686),high(3686)
.db 1+cHW,low(350),high(350),low(82),high(82),1+cHW,low(26),high(26),low(3686),high(3686)
.db 1+cHW,low(350),high(350),low(82),high(82),1+cHW,low(26),high(26),low(3686),high(3686)
.db 1+cHW,low(350),high(350),low(82),high(82),1+cHW,low(26),high(26),low(3686),high(3686)
.db 1+cHW,low(350),high(350),low(82),high(82),1+cHW,low(26),high(26),low(3686),high(3686)
.db 1+cHW,low(350),high(350),low(82),high(82),1+cHW,low(26),high(26),low(3686),high(3686)


The first line:

.db 1+cHW,low(350),high(350),low(168),high(168),2+cH,26,60


says that a single signal (1) with 16 bit (+cHW) and with an active LED is for 350 cycles on and off for 168 cycles. 350 means that that the LED is turned on and off 350 times for 26.04 microseconds, yielding a duration of 9114 µs. The value measured was 9120 µs. Following that active phase a pause of 168 cycles length is absolved, means 4375 µs, measured was 4370. After that two signals (2) with the LED on and 8 bit length (+cH), 26 signals with the LED on and off and 60 signals with the LED off follow. The 26 signals with on and off are 677µs long (measured: 690), the 60 cycles off require 1562µs (measured were 1560).

The table shows that starting from line 6 the same signal structure repeats as long as the key of the remote control is pressed. So the information is in the start sequence (the first five lines), and it is not necessary to send all of the following lines. Other remote controls repeat those first lines on and on as long as this key is pressed. The table allows for easy recognition, which of the lines have to be transmitted. If the signal structure is longer, the "Table length" can be increased.

The content of the table can either be stored as a text file or copied to the clipboard and inserted into the assembler source file.

To the top of page, To the IR title page

Receiver data

If after loading the data file the mode "RX" is selected, the data is processed for receiving and decoding with an AVR. The parameters in the "RX options" are used for that. Here, the clock frequency of the processor and the prescaler of the timer can be selected. With default conditions, a timer tick of 53.33 µs is selected. With "Create table" the calculation is started.
TX table
The table in the output window is designed as follows:
  1. First bit-oriented output sequences are identified. Those sequences consist of short high- and low-signals. In the displayed example a zero consists of 13 cycles high and 8 cycles low, a one consists of 13 cycles high and 29 cycles low. Eight, 16 or 32 of zeroes and ones are combined to encode a command. For recognising the zeroes and ones a bandwidth is defined, in our case a zero should be recognised by something between 11 and 14 high and 8 to 9 low. A one is between 11 and 14 high and 29 to 30 high. This width is listed in table form.
  2. Those bit sequences are preceeded with a start sequence. In the case here, this is a signal with 170 to 171 cycles high-duration and a pause of 82 cycles. The start sequence is mostly identical for all keys of the remote control. If not, the new start sequence in the table preceeds the key values with an identical start sequence.
  3. The values to identify the key are given either as sequences or as single values. Sequences are displayed in hex form, with the bit length in the comment of the line. If a single signal is to be identified, its high- and low-duration and the bandwidth is given.
  4. At the end of the table the end sequences for each key is given, those follow the bit sequences. If those end sequences separate single bit sequences, e.g. after each 8 bits, two or more of those end sequences appear.
If only the bit sequences should be displayed, the selection field "Sequence codes only" can be selected. If selected only these code sequencesw appear.

The content of the table can either be stored as a text file or copied to the clipboard and inserted into the assembler source file.

To the top of page, To the IR title page

©2011 by http://www.avr-asm-tutorial.net