I want to decode the IR signals of my speaker's remote (Edifier S3000Pro).
I bought the Arduino UNO and TSOP1838 (2 units expecting 1 to fail) for this purpose. Using the code mentioned below, I expected an output on the serial comm, but there was no output. Both the units are not working. Please help.
Pinout of 1838: Data, Ground and Vcc (5V & 3.3V, tested with both)
Remotes tested with: a) Sony hts500rf's remote b) Edifier S3000Pro's remote c) Sony X90J's remote (only power button, since remaining buttons are WiFi based)
#include <IRremote.hpp>
const int IR_RECEIVE_PIN = 2;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println(F("Enabling IRin..."));
IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK);
}
void loop() {
// put your main code here, to run repeatedly:
if (IrReceiver.decode()) {
Serial.println(F("Received data...decoding..."));
Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX); // Print "old" raw data
// USE NEW 3.x FUNCTIONS
IrReceiver.printIRResultShort(&Serial); // Print complete received data in one line
IrReceiver.printIRSendUsage(&Serial); // Print the statement required to send this data
IrReceiver.resume(); // Enable receiving of the next value
}
}
Yes my serial monitor is set to 115200. I can see the output "Enabling IRin..." on my PC serial monitor.
I'm not 100% sure if the remotes follow 38KHz modulation frequency. I expected atleast one of the remote to be on 38KHz. Also, I have an IR blaster on my phone.
Next steps:
I'll try with other TSOP modules for different frequencies and update in a week.
Check with 38KHz signal transmitted from my phone's IR blaster.
Dear Forum Members, Thank you for taking your time to help me.
I found the solution. I needed to add a few resistor/capacitor to remove the ambient light noise.
I bought this product and it worked like a charm. Now i can decode my speaker's remote signals.