TSOP 2238 Remote Problem

Hello there;

I have a question about an issue. I want to know why to this problem. I'm going to work on something related to remote control. First of all, I print the hex value of the command given from remote on the serial monitor with codes I found on internet. I use TSOP 2238 as reciever and 3 remotes as transmitter. One of the remotes is the Samsung TV remote. This remote works great with code. Each button on the remote has its own hex value. I can't get a fixed hex value in the other remotes I've shared the picture of blow.

Even though I press the same button, I see a different hex value on the serial monitor.

Ekran Alıntısı5

The code I am use as follows;

#include <IRremote.hpp>


int RECV_PIN = 7;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()

{

Serial.begin(9600);

irrecv.enableIRIn(); // Start the receiver

}

void loop(){

if (irrecv.decode(&results)) {

Serial.println(results.value, HEX);

irrecv.resume(); // Receive the next value 
}

}

Any ideas what could be causing this problem? Also what can I do to fix it?

There are several different carrier frequencies in use.

For a remote to work with your receiver, the carrier frequencies should match.

That's fully normal. Different remotes use different codes.

@jremington Thank you for your answer. I think the carrierfreq is the same 38KHz. Because if the carrier freq isn't same , I won't see a value when I press the button. I don't know maybe I am wrong

@Railroader So how do I change the code? Can you share a sample source code or guide me to the solution ?

Then your library is not decoding it correctly

No it is not, the same button on the same remote should produce the same code

OP looked like comparing buttons on different remotes.

From the screenshot OP posted it is pretty obvious they didn’t compare the same button on 9 remotes

Just try the IRremote library specific example ReceiveDemo (file > examples>IRremote>ReceiveDemo) and post the result.

@ArminJo First of all sorry for my late reply. I tried what you mentioned in comment. I am sharing output below.

I pressed the same button on the remote 3 times and each time I saw a different hash address on the serial monitor. Is there any way to fix this problem?

The data look very insane! You have serious problems with your receiver circuit or the power supply or the connections or all of them!