Jump to content
43oh

Sending Samsung TV RAW IR-codes


Recommended Posts

Hello, 

I have studied these two manuals for the arduino and I have tried to implement this with the msp430g2533.
 

http://as3breeze.com/arduino-sending-samsung-ir-codes/

 

http://arduinostuff.blogspot.de/2011/06/samsung-remote-ir-codes.html

 

I have similar codes dumped with irrecvdump demo.

 

 

In IRremote.cpp i commented this out:

 

  //pinMode(TIMER_PWM_PIN, OUTPUT);
 //digitalWrite(TIMER_PWM_PIN, LOW); // When not sending PWM, we want it low
 
IR-LED PIN ist connected to P2_3 and GND.
 
/*
 * IRremote: IRsendDemo - demonstrates sending IR codes with IRsend
 * An IR LED must be connected to Arduino PWM pin 3.
 * Version 0.1 July, 2009
 * Copyright 2009 Ken Shirriff
 * http://arcfn.com
 */

#include <IRremote.h>

unsigned int powerOn[68] = {4500, 4500, 600, 1600, 600, 1650, 600, 500, 650, 500, 550, 550, 600, 500, 600, 1650, 600, 500, 600, 1650, 600, 1650, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 1650, 600, 500, 600, 1650, 600, 500, 600, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 500, 600, 550, 600, 1600, 600, 1650, 550, 1650, 600, 1650, 600, 1650, 550, 1650, 650, 1600, 600};

IRsend irsend;

void setup()
{
  Serial.begin(9600);
}

void loop() {
   
  irsend.sendRaw(powerOn,68,38);
  digitalWrite(11, LOW); //sometimes IR LED stays on??
        delay(4000);
       // irsend.sendRaw(powerOn,68,38);
       
}

The IR LED is flashing but it is not recognized by the TV,

What is going wrong?

 

Has anyone got a hint?

 

 

Edit:

 

Added Datasheet for IR-LED LD217

 

How should this be wired correctly? Do i need a transistor?

184365-da-01-ml-IR_S_DIODE_LD271___LD271L_de_en.pdf

IRremote.zip

Link to post
Share on other sites

I'm really frustrated,

 

doing the same with a Yamaha AV-Receiver, no Problems.

recorded IR Signals sent as RAW works!!!

 

So, no errors in the wiring! 

 

 

 

I add the Samsung Codes in the library and attached it here, with that I can decode signals -> E0E040BF = Power On/OFF in 32-bit
 
 
When i send:
 
irsend.sendSamsung(0xE0E040BF, 32);

no reaction of the TV!!    :wacko:  as same as with the RAW codes...

 
 
 
 
I have 2 Samsung TVs,with remote control: AA59-00582A
 
 
 
Where the dog is buried?
Link to post
Share on other sites

Thank you bluehash,

 

hmm, samsung tvs are apparently problematic...
I have no other solution for the Samsung IR Codes adaptation of the library, 
 
I've commented out the two lines in the IRremote.cpp, 
 
Does it make sense to continue to experiment in the IRremoteInt.h?
 
// defines for Timer_A (16 bits)
// NOTE: Using A1 instead of A0 because A0 is used by Serial
#if defined(IR_USE_TIMERA)
#define TIMER_RESET
#define TIMER_ENABLE_PWM     (TA1CTL = TASSEL_2 + MC_1) // SMCLK, Up mode
#define TIMER_DISABLE_PWM    (TA1CTL = TASSEL_2 + MC_0) // SMCLK, Stop mode
#define TIMER_ENABLE_INTR    ({ /*TA1CTL |= TAIE;*/ TA1CCTL0 |= CCIE;}) // SH 071112 
#define TIMER_DISABLE_INTR   ({TA1CTL &= ~TAIE; TA1CCTL0 &= ~CCIE;})
#define TIMER_INTR_NAME      TIMER1_A0_VECTOR
#define TIMER_CONFIG_KHZ(val) ({ \
      TA1CCTL0 |= OUTMOD_4;	 \
      TA1CCR0 = FOSC/val/2;      \
})

// TODO: update TIMER_CONFIG_NORMAL
// need to alter the math?

//   TA1CCR0 = SYSCLOCK * USECPERTICK / 1000000;

#define TIMER_CONFIG_NORMAL() ({               \
  TA1CTL = TASSEL_2 + MC_1 ;                    \
  TA1CCTL0 |= OUTMOD_4;	                       \
  TA1CCR0 = SYSCLOCK * USECPERTICK / 1000000;                               \
  TA1R = 0;				       \
})
#endif
Link to post
Share on other sites

i send the IR Code, but after sending, the IR LED stays on.. until the next irsend command, but i don't know why

sometimes after sending it is on, sometimes off

 

Whether the code is right or wrong, the red LED from the TV is not even blinking, thus, it  not receives the signal

Link to post
Share on other sites

after 3 days of breeding,

the egg is layed!

 

use this pulse parameters

#define SAMSUNG_BITS 32
#define SAMSUNG_HDR_MARK 4500
#define SAMSUNG_HDR_SPACE 4250
#define SAMSUNG_BIT_MARK 600
#define SAMSUNG_ONE_SPACE 1400
#define SAMSUNG_ZERO_SPACE 450

now it works, easter may come  B)

Link to post
Share on other sites

after 3 days of breeding,

the egg is layed!

 

use this pulse parameters

#define SAMSUNG_BITS 32
#define SAMSUNG_HDR_MARK 4500
#define SAMSUNG_HDR_SPACE 4250
#define SAMSUNG_BIT_MARK 600
#define SAMSUNG_ONE_SPACE 1400
#define SAMSUNG_ZERO_SPACE 450

now it works, easter may come  B)

Thanks for posting your solution! Not many do that.

 

Also.. was it a lot different from the original?

Link to post
Share on other sites

Did you solder the crystal to the launchpad? I wonder if my problem is the clock (since I'm still not succeeding in controlling my TV, and now I'm pretty sure the codes I'm using are right).

 

Edit: my tv is an LG, it uses NEC codes (so I'm using sendNEC) and I think the timing is slightly off: while the tv doesn't react, a lirc receiver recognizes the codes (though with some difficulty). I don't know if what's off is the mark/space timing or the 38KHz carrier.

Link to post
Share on other sites

@@StefanWxx, I see that you had to reduce the mark/space timing by 10-15% wrt the timings in the arduino posts. This is consistent to what I had to do to get the NEC protocol working. I also have a (probably not 100% correct) solution for the led remaining on.

See http://forum.43oh.com/topic/5396-irremote-library-sometimes-leaves-led-on/ for details.

 

Edit: BTW, from the look of it, I'd say that samsung too is using the NEC protocol, so probably there is no need to add a separate sendSamsung function.

Link to post
Share on other sites
  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...