I setup a 2-player scoreboard and modified to receive commands from an IR remote. Initially I used an IR module that came with an Arduino intro kit, but then moved to a single IR diode (no circuit board). It seemed to work OK until I started testing it away from my desk. As soon as I moved to testing away from my workbench I noticed the performance drops off rapidly once I get 10 feet or so away, or slightly at an angle (still indoors). At first I thought it was the diode, but plugging the module in shows similar results. There's a bit of attenuation area where it goes from 99% accuracy to maybe 20%, but the LED flashes with every push of the remote.
The thing is, I can see the LED on the receiver flashing like it's receiving commands, but it's not registering with Arduino. What would cause that, is it an issue of signal strength not being above a certain cutoff (but the IR module doesn't have the same limit)?
As an aside, what's the difference between an IR module and a single diode? I assumed there was signal amplification and filtering, but I'm not seeing much of a performance difference.
What is the LED you see "flashing"? The receiver has an IR sensor, it doesn't flash anytime.
What do you mean with "registering"? Show us some code, together with the connections and the kind of receiver you're using (a direct link to the exact item is appreciated).
An IR receiver module (e.g. the ones with a small board, like THIS) uses a special IR sensor, like TSOP1838, with a frequency carrier filtering included (the last two digits of the code, e.g. 38 kHz for TSOP1838).
There's no amplification because its output isn't analog: if the carrier is detected, gives a HIGH value, otherwise it's LOW.
BTW, small boards of KY-022 or similar have no components added, they have just a connector to ease installing and cabling.
Finally, IMHO the issue you're writing about is due to the poor (low) IR signal power of such small "demo" remote transmitters. Use a regular remote.
Obviously, more. We've all used TV remotes and know what they are and are not capable of. This is nowhere close. So I was asking to see if that was normal; I was under the impression that's the purpose of these forums.
We've all used TV remotes and know what they are and are not capable of.
You can't compare that cheap Elegoo remote to a Sony or Panisonic
10 ft is probably good.
If you have a spare TV, DVD, VCR remote you can use that instead.
Mine does. Every time I push a button on the transmitter a small LED flashes on the receiver module.
Thanks for the rest of the explanation. I didn't provide code because it didn't really seem code-based - it's mostly just using the IRremote.h library and putting in calls in the loop to read the results and increment the scoreboard accordingly like this:
switch(results.value){
case 0xFFC23D: //Keypad button "Skip Forward" for P1 up
if(counterA == 21 && digitalRead(bluePin) == HIGH)
{
counterA = 15;
Serial.print(F("PlayerA ")); Serial.println(counterA);
displayA.setCursor(0);
if (counterA < 10) displayA.print(" ");
displayA.print(counterA);
}
else if(counterA<21)
{
counterA++;
Serial.print(F("PlayerA ")); Serial.println(counterA);
displayA.setCursor(0);
if (counterA < 10) displayA.print(" ");
displayA.print(counterA);
}
}
Someone mentioned below that the remotes that come in kits are known to be weak. I think that might be it; I'll try with a normal remote this evening. If that doesn't work I'll post up the full code. Thanks again.
Yup, got it, thanks. Someone else said the same thing and I realized that was probably it. I assumed all remotes would just use standard transmitters, didn't realize there was such a difference in performance. I'll give that a shot.
No. I got a receiver module on a chip like this on the beginner kit I stared with. But I purchased some individual receivers like this to build some projects. I was a little surprised that I could swap in the individual component for the module and there wasn't any difference in functionality, so I was trying to figure out what the difference was.
Ok, I'll have a look. I assume that as the signal gets weaker the receiver mis-reads the signal and spits out some garbage value, which doesn't trigger arduino to do anything. Makes sense. As others have pointed out, I'm using a cheap remote that came with the kit and they're known to be underpowered. I'll try a standard remote.
Thanks for the explanation on the breakout board module.
Yep, because that's not just an "IR receiver" (it "receive", doesn't light up..), but you're using a "breakout board", i.e. a small PCB board like the one I linked you on post #3, in this case has not only a header connector, but also a SMD LED showing activity.
Let me say if one always specify exactly what kind of elements we're talking about since the very first post, we all save a lot of time, don't you think?
That's why I called one a "module" and specified that the other was just the diode without a circuit board. I didn't know the proper term was "breakout board". And then I linked both in a follow-up post to be clear what I was talking about. But thanks anyway.