I have problem with Infrared Receiver Module VS1838B. To handle it i use IRremote lib. I connect it to Arduino successfull. With example program from IRemote, codes from remote controller shows up in Serial monitor, but... almost every time when i push the same button, codes are different. For example, below are codes received from remote controller, compatible with NEC protocol. I press all the time the same button.
From serial moniotor:
From this list i can assume, that the right button code is 0xFFA25D - repeated. From NEC protocol, i know that code 0xFFFFFFFF mean the button is held down. What is the meaning of the other codes shown above? Where they came from? The same situation is with any remote controller. THX for help.
my problem was program memory size but how i got there was because using the Shiriff library left me with somewhat unresolved issues - i was getting (some of) those strange codes as well.
here's a copy of the relevant part of that thread i started;
======START COPY=======
i did already try the shiriff IRremote-library but was getting inconsistent feedback, which is why i ended up trying the Adafruit way, a bit more complex but a lot more learned in the process !
for what it's worth, with the shiriff Library "IRrecvDemo" i got extraneous data like;
the HEX codes in Blue being the relevant ones.
could that indicate faulty hardware ?
======END COPY=======
am i right in guessing that the hardware is possibly faulty in that case ?
it's using the DFRobot IR receiver module which has no chip-specs so i can't really tell what it is !
on a theroretical aside; is it possible to read IR signals (from an IR-LED) via an IR photodiode ?
one would connect that to an Arduino INPUT pin, and then just digitalRead LOW or HIGH, right ?
Never buy electronic components if you cannot get a data sheet for it. I am pretty sure there is a reason sellers do not provide the model number of a component.
Regarding using a photo sensor to receive an IR signal: Yes its possible, but is likely to be a lower quality receiver than the one you already have. It will suffer from lots of inteference from ambient light and more. It is much cheaper just to buy a quality IR receiver.
Regarding the signals you are getting
FD08F7
DEE522C1
FD08F7
FFFFFFFF
The valid signals will be the ones with the last 2 hex bytes inverted.
so '08' is the inverse of 'F7' above
You could use that trick to only recognise signals which pass this error check (or ignore ones that don't).
In your case the FD is an ID code and should be the first HEX byte of every valid signal. If you check that the last 2 HEX bytes are inverted, you have a way of ensuring you only detect valid signals - even with this receiver.
Also the FFFFFFFF is just a repeat signal for the NEC protocol, if you keep a key pressed the code is sent once and then the repeat code is sent until you release the key..
Never buy electronic components if you cannot get a data sheet for it. I am pretty sure there is a reason sellers do not provide the model number of a component.
Regarding using a photo sensor to receive an IR signal: Yes its possible, but is likely to be a lower quality receiver than the one you already have. It will suffer from lots of inteference from ambient light and more. It is much cheaper just to buy a quality IR receiver.
ahh i see, okay - it's just for academic purposes, and if for a simple digital switch, then it should suffice for that purpose.
AnalysIR:
Regarding the signals you are getting
FD08F7
DEE522C1
FD08F7
FFFFFFFF
The valid signals will be the ones with the last 2 hex bytes inverted.
so '08' is the inverse of 'F7' above
You could use that trick to only recognise signals which pass this error check (or ignore ones that don't).
In your case the FD is an ID code and should be the first HEX byte of every valid signal. If you check that the last 2 HEX bytes are inverted, you have a way of ensuring you only detect valid signals - even with this receiver.
wow, great tips !!
thanks so much !
AnalysIR:
Also the FFFFFFFF is just a repeat signal for the NEC protocol, if you keep a key pressed the code is sent once and then the repeat code is sent until you release the key..
ahh, it's possible the transmitter (on a remote control) is faulty, even if i press a key just briefly, i'm getting the 'FFFFFFFF' codes - loose button, or 'debouncing' ?
ahh, it's possible the transmitter (on a remote control) is faulty, even if i press a key just briefly, i'm getting the 'FFFFFFFF' codes - loose button, or 'debouncing' ?
No - that is normal, even with a short press you can get the FFFFFFFF repeat codes.
In most cases just ignore the FFFFFFFF codes in this NEC protocol, unless using VOL+/VOL- or brightness in the case of lights.
ahh, it's possible the transmitter (on a remote control) is faulty, even if i press a key just briefly, i'm getting the 'FFFFFFFF' codes - loose button, or 'debouncing' ?
No - that is normal, even with a short press you can get the FFFFFFFF repeat codes.
ok, good to know !
AnalysIR:
In most cases just ignore the FFFFFFFF codes in this NEC protocol, unless using VOL+/VOL- or brightness in the case of lights.
or, if one wants to make a robot move while the button is still pressed.
It's a very old post but I had facing the same problem this week and after one day, I have realized that the problem comes from the poor quality of the remote control, so I have change to my Sony TV remote control and the problem was fixed, I have writen a post on my facebook page regarding this : Arduino 4 fun (http://www.arduino4fun.com)
I know it's an old topic but it helps me a lot to have some ideas about what can goes wrong. I have a similar problem and it's partially due to cheap hardware but I noticed that the problem occurs mostly when I'm not pointing the IR remote directly toward the receiver. It's somehow related to another answer about the distance of the remote and the receiver, but remember that the direction is very important due to using cheap hardware. When I use my LG TV remote, it almost always prints the same code even if I point to other directions.
I am also using 1838 IR receiver that comes with 37 in 1 Kit. It seems cheap Chinese version. Using IRremote library I was also getting inconsistency of data for the same button. However after using RILib2 library I am able receive consistent data.