IRRemote problem

Status
Not open for further replies.
Hello everyone,

I'm using a Teensy 3.2 and I have some trouble using the IRRemote library: The received codes are not consistent and reproducible. I also get many 0xFFFFFFFF codes.
I am using a TSOP31238 module connected to pin 7.
I have also tried several remotes, brand new ones but also very old ones. The debug output for short presses of one remote button (always the same) is e.g.

Code:
NEC: FFFFFFFF
NEC: 8F7807F
FFFFFFFF
FFFFFFFF
FFFFFFFF
FFFFFFFF
UNKNOWN: FCABFFBF
FFFFFFFF
FFFFFFFF
UNKNOWN: 4CB0FADF
FFFFFFFF
UNKNOWN: 49B0F625
FFFFFFFF
NEC: FFFFFFFF
FFFFFFFF
UNKNOWN: 4AB0F7B6
FFFFFFFF
FFFFFFFF
UNKNOWN: 4AB0F7B6
FFFFFFFF
FFFFFFFF
FFFFFFFF
FFFFFFFF
UNKNOWN: 49B0F625
FFFFFFFF
FFFFFFFF
FFFFFFFF

I have tried IRRemote version 2.0.1, 2.2.3 and 2.4.0 beta. All with the same results...
Does anyone have a hint for me?

Regards
 
Are you using the Teensy built in version?
https://www.pjrc.com/teensy/td_libs_IRremote.html
Yes, think so. On that page it says, that it is included in the teensyDuino installer. I have updated the Arduino IDE to 1.8.5 and after that reinstalled teensyduino.
But there is no change.
If you have a scope verifying the receiver is working would be good
Yes, I've analyzed the signal I am sampling. As you can see in my first post I am receiving a signal when I press a button on a remote control.

Is the pin (7) I am using compatible?
 
Are you running one of the examples from the library? Which one? if not, can you post your code as the "forum rule" states.

maybe try running the example IRecvDump.

A scope or logic analyzer on pin 7 (your IR receiver pin) would provide additional insight.

Attach a photo of your wiring?

Any other devices contributing IR noise or reflections?

I see the 0-bit FF's often, but they seem harmless, IRecvDump with Sony remote
Code:
Decoded SONY: 61A (12 bits)
Raw (26): 2450 -550 600 -600 1250 -550 1250 -600 600 -550 650 -600 650 -550 600 -600 1250 -550 1200 -600 650 -550 1200 -600 650 
FFFFFFFF
FFFFFFFF (0 bits)
Raw (26): 2400 -550 650 -600 1200 -600 1200 -600 600 -600 600 -600 650 -550 600 -600 1250 -550 1250 -600 600 -550 1250 -600 600 
FFFFFFFF
FFFFFFFF (0 bits)
Raw (26): 2400 -550 650 -550 1250 -550 1250 -550 650 -550 650 -600 600 -600 600 -600 1200 -600 1200 -600 650 -550 1200 -600 650 
61A
Decoded SONY: 61A (12 bits)
Raw (26): 2450 -550 650 -600 1200 -550 1250 -600 600 -600 600 -600 600 -600 600 -600 1250 -550 1200 -600 650 -550 1200 -600 650 
FFFFFFFF
FFFFFFFF (0 bits)
Raw (26): 2400 -550 600 -600 1200 -600 1200 -600 650 -550 650 -550 650 -550 650 -600 1200 -600 1200 -600 600 -600 1250 -550 650 
FFFFFFFF
FFFFFFFF (0 bits)
Raw (26): 2400 -550 650 -600 1200 -550 1250 -600 600 -600 600 -600 600 -600 650 -550 1250 -550 1250 -550 650 -550 1250 -600 600
FWIW, i see FFs when testing on UNO and Teensy 2.0 too.

Looking at lib, decoder sends FFFFFFFF if it thinks code is a REPEAT. Analyzer shows my Sony remote sends 3 events for every button push.
 
Last edited:
Well, I'm working on a larger program, but I am actually using the IRecvDum dump to only test the receiver part of the circuit. I have attached a screenshot of that part.

I have reattached my logic analyzer and I have found the problem now. The signal is indeed noisy! I have a 50Hz pulse (which is the mains frequency over here) on the TSOP ouput. That is interferrring with the IR signal and therefore the decoding fails.
If I cover the TSOP I can get a signal that can be decoded without errors.

SNAG--2018.02.12-0000.png
Uncovered TSOP with 50Hz noise:
SNAG--2018.02.12-0001.jpg
Covered TSPO without noise:
SNAG--2018.02.12-0002.jpg

I need to surpress the mains frequency somehow.... Any hint? :confused:
 
Ok that's a new one

If it goes away when you cover the Rxer, is this coming from your lighting? 50hz flicker is sort of normal in visible wave lengths and possibly into UV if you have fluro or LED lights but IR is odd. Your TSOP31238 is supposed to be filtering for the IR carrier so this suggests that once each cycle something produces a burst of modulate IR light. Even stranger it would normally happen at 100hz, once for each zero crossing. Other option is you have RF noise though would have expected more than a finger covering the sensor to cut that down meaningfully.
 
FYI, looking at the library, the decoder will send FFFFFFFF if it thinks a sequence is a REPEAT (based on device-dependent inner-sequence gap). The analyzer shows 3 events for a single button push on my Sony remote. Sometimes library reports all 3, other times it reports one and two FFs.

Maybe a tube on your receiver to block out some of the background IR. My halogen room light will occasionally cause a short blip on the logic analyzer from the IR sensor, but the library ignores it.
 
Last edited:
Had these FFFFFFFF's too in a recent arduino project, Filtered them using an IF statement, as well as all of the "unknown" protocol messages.
Maybe some band-pass R/C filter will get the signal better.
 
Quick update:
I resolved the problem by replacing the TSOP31238 with a TSOP4838.
This new receiver has an even better noise reduction. I now have no decoding issues anymore.
And yes, the 0xFFFFFFFF codes indicate that the code is send repeatetly.

Thank you guys.
 
Status
Not open for further replies.
Back
Top