Arduino IRremote added Samsung protocol

Trying to decode some remote controls I saw waveform of Samsunfg IR protocol is almost the same as NEC one. Deatils are in following pictures (created with Audacity and simple IR receiver connected to mic input).

NEC:
NEC_ir

Samsung:
samsung_ir

Differences are only in heading pulse time. For NEC is 9ms mark and 4.5 ms space, for Samsung is 5ms mark and 5ms space.

Another difference is that NEC have repeat command and Samsung repeat whole code again insteead of special command.

NEC repeat command:
NEC_ir_repeat

I found excellent page with description which confirmed my measurements:
http://www.techdesign.be/projects/011/011_waves.htm

Next I added some code to original Arduino-IRremote library and my version with Samsung protocol is published here:
https://github.com/sstefanov/Arduino-IRremote.git

5 Comments:

  1. Hello.
    I downloaded your package to the Arduino from this place: https://github.com/shirriff/Arduino-IRremote/zipball/master.
    Can you reduce the library only to Samsung?
    I would like to use it on the ATmega, but it is too large.
    Thanks in advance.

  2. I changed the sources and now you can select what to compile. You can get changes from my GitHub

    To exclude not needed libraries just comment some of these lines in file IRremote.h:

    // Send types
    #define IRsendNEC
    #define IRsendSONY
    #define IRsendRC5
    #define IRsendRC6
    #define IRsendDISH
    #define IRsendSHARP
    #define IRsendPANASONIC
    #define IRsendJVC
    #define IRsendSANYO
    #define IRsendMITSUBISHI
    #define IRsendSAMSUNG
    #define IRsendRAW
    // Values for decode_type
    #define NEC 1
    #define SONY 2
    #define RC5 3
    #define RC6 4
    #define DISH 5
    #define SHARP 6
    #define PANASONIC 7
    #define JVC 8
    #define SANYO 9
    #define MITSUBISHI 10
    #define SAMSUNG 11

    • Many thanks for your reply.
      Well thanks for your work!
      So, if I wanted to leave only Samsung, the code would look like this:

      // Send types
      // #define IRsendNEC
      // #define IRsendSONY
      // #define IRsendRC5
      // #define IRsendRC6
      // #define IRsendDISH
      // #define IRsendSHARP
      // #define IRsendPANASONIC
      // #define IRsendJVC
      // #define IRsendSANYO
      // #define IRsendMITSUBISHI
      #define IRsendSAMSUNG
      // #define IRsendRAW
      // Values for decode_type
      // #define NEC 1
      // #define SONY 2
      // #define RC5 3
      // #define RC6 4
      // #define DISH 5
      // #define SHARP 6
      // #define PANASONIC 7
      // #define JVC 8
      // #define SANYO 9
      // #define MITSUBISHI 10
      #define SAMSUNG 11

  3. IRSend lines are if you want to use Arduino as a sender.

    If you use it only as receiver you must uncomment only this line:
    #define SAMSUNG 11

    My code changes are already part of master code for IRArduino and everyone can use them to reduce code size. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.