Go Down

Topic: IR receive problem - unknown random codes (Read 887 times) previous topic - next topic

toomus

Feb 05, 2014, 09:32 pm Last Edit: Feb 06, 2014, 10:12 am by toomus Reason: 1
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:
Code: [Select]
0xFFFFFFFF
0xCC0472F2
0xEB08FCD1
0x920B2F15
0xFFA25D
0xF68369C0
0x6AD683BE
0xB77063E3
0xFFA25D
0x300A3DFC
0xF572FB9B
0xFFA25D
0x822BB6CC
0xC3494FE
0xFFFFFFFF
0xFFA25D
0xE46323BF
0xFFA25D
0xFFFFFFFF
0xFFA25D
0xFFA25D
0xFFFFFFFF
0xFFA25D
0xFFA25D
0xFFA25D
0xFFFFFFFF
0xFFA25D
0xFF
0xFFA25D
0x675E5312
0xFFFFFFFF
0xFFA25D
0xFFA25D
0xE318261B
0xFFFFFFFF
0xFFA25D
0xFFA25D
0xFFFFFFFF
0xFFA25D
0xFFFFFFFF
0xFFA25D
0xFFFFFFFF
0xFFA25D
0xFFA25D
0xE318261A
0xDCC262AB
0xDE912C3A
0xFFFFFFFF
0x6A9A5C6D
0xFFFFFFFF
0xD5482102
0x261CB2C8
0x55FA3E70
0xA2B842E9
0x5F4246BF
0xFFA25D
0xFFA25D
0xFFFFFFFF
0x193715BE
0xFFFFFFFF
0xDB64D040
0xFFFFFFFF
0xFFA25D
0xCC805BC

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.

AnalysIR

In my opinion, these 'cheap' receivers (@36 cents) can cause lots of problems & I would suggest using IR receivers from Vishay (no connection).

However, it should still work for a standard NEC type signal.

Can you post the model of the device (TV, Aircon), how you have wired the IRreceiver to the Arduino & the actual code you used.

How do you know its an NEC signal?

Have you tried to test with any other remote control. Are the batteries good?
Visit our Blog about Infrared Remote Control >>>> http://www.AnalysIR.com/blog/  Twitter: @AnalysIR
First Read this PDF=> 10 common pitfalls with Infrared Remote Control >>> http://bit.ly/1cvd0at

toomus

I use this kit http://allegro.pl/arduino-zestaw-ir-pilot-nadajnik-odbiornik-fv-i3961999934.html
To get it to work i use this tutorial http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html
To test it i use programs from https://github.com/shirriff/Arduino-IRremote examples folder
IRemote says that this is NEC.
I tested it with other remotes - Panasonic TV, Panasonic radio, Ariva tuner. Results always the same - some of the codes are unknown.
I think you have right. The problem causing very cheap, low quality IR receiver.
Is this will be good? http://allegro.pl/odbiornik-podczerwieni-tsop31236-36khz-i3880629962.html
THX for reply.

AnalysIR

TSOP31236 id not good, because it has the wrong  modulation frequency for the remote you are using.

Instead, go for TSOP31238, which is available on the same site and is designed for 38kHz.


Make sure you check the data sheet for pinout as it is often different between devices, even from the same manufacturer.
Visit our Blog about Infrared Remote Control >>>> http://www.AnalysIR.com/blog/  Twitter: @AnalysIR
First Read this PDF=> 10 common pitfalls with Infrared Remote Control >>> http://bit.ly/1cvd0at

retronet_RIMBA1ZO

hello AnalysIR, you seem quite the go-to-guy for InfraRed codes.

awhile back i posted a thread;
http://forum.arduino.cc/index.php?topic=215277.msg1575375#msg1575375
which was related to IR remote codes being read manually (adafruit tutorial)

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;
Quote
FD8877
FFFFFFFF
FFFFFFFF
FFFFFFFF
6F5974BD
FFFFFFFF
FFFFFFFF
FFFFFFFF
FFFFFFFF
FFFFFFFF
6F5974BD
FFFFFFFF

and
Quote
DEE522C1
FFFFFFFF
DEE522C1
FD08F7
DEE522C1
FD08F7
FFFFFFFF
FD
FFFFFFFF
FD
FFFFFFFF


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 ?

AnalysIR

Common problems are:
- wiring / circuit / buggy 'C' code
- cheap IR receiver
- batteries in remote control
- not close enough to receiver (or too close)

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
Code: [Select]
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..
Visit our Blog about Infrared Remote Control >>>> http://www.AnalysIR.com/blog/  Twitter: @AnalysIR
First Read this PDF=> 10 common pitfalls with Infrared Remote Control >>> http://bit.ly/1cvd0at

retronet_RIMBA1ZO


Common problems are:
- wiring / circuit / buggy 'C' code
- cheap IR receiver
- batteries in remote control
- not close enough to receiver (or too close)

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.



Regarding the signals you are getting
Code: [Select]
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 !



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' ?

AnalysIR

Quote
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.
Visit our Blog about Infrared Remote Control >>>> http://www.AnalysIR.com/blog/  Twitter: @AnalysIR
First Read this PDF=> 10 common pitfalls with Infrared Remote Control >>> http://bit.ly/1cvd0at

retronet_RIMBA1ZO


Quote
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 ! :)


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. :D

Go Up