increase IR communication reliability under direct sun light

Thread Starter

bug13

Joined Feb 13, 2012
1,954
Hi team

Is there a way to increase IR communication reliability under direct sun light, with some kind of encoding technique? I am current using NEC encoding, but I find it it's very easy lost data if there is direction sun light on the IR diode.

Thanks guys!
 

bertus

Joined Apr 5, 2008
21,364
Hello,

Are you using modulation?
An IR remote uses 36 to 40 kHz modulation to avoid daylight influences.

Bertus
 

Ramussons

Joined May 3, 2013
973
If there is direct sunlight on the IR (or optical) detector, I don't think any modulation / encoding will help.
The sunlight will blind the receiver.
The right way would be to shield the detector from direct sunlight. Encoding will suppress errors due to ambient light.
 

Thread Starter

bug13

Joined Feb 13, 2012
1,954
Hello,

Are you using modulation?
An IR remote uses 36 to 40 kHz modulation to avoid daylight influences.

Bertus
I am using 56KHz, NEC IR encoding scheme. It works fine in normal in door environment. But it’s not reliable (more bad checksum) when there is direct sun light.
Is there a better IR encoding scheme than NEC one? Or is there any mathematical encoding techniques that can have some sort of error correction on top of what I am already doing?
 

Sensacell

Joined Jun 19, 2012
2,825
I am using 56KHz, NEC IR encoding scheme. It works fine in normal in door environment. But it’s not reliable (more bad checksum) when there is direct sun light.
Is there a better IR encoding scheme than NEC one? Or is there any mathematical encoding techniques that can have some sort of error correction on top of what I am already doing?

What are you using as a detector?
This is not a software problem, a different encoding scheme is not going to help.
 

andrewmm

Joined Feb 25, 2011
1,470
By direct sun light, what to you mean ?

You have chosen a encoder / decoder, that's fine, but me thinks it is designed to work in side,

As others have said,
you need to ensure that the receiver is not over loaded by sun light.
If it is , no matter what you do in SW or at the transmitter, it wont help.

A typical first start is that dark red window used on the front of tv remote controls,
its purpose is to band pass the wavelength of interest to you, and attenuate others,

The next, is to turn the gain down of the receiver,
Assuming the opto itself is not over loaded, this give a chance for your modulation to get through.

Modulation is used for two reasons in Opto circuits.
a) Opto's need a high gain, which is much easier to achieve in a AC coupled circuit than a DC coupled one.
b) mathematically, you can detect a modulated signal that is under the noise,

As an aside, the voyager craft, the signal from there about 20 watt transmitter is around 1 billionth of a watt when it reaches earth, For reference, the power of moon light is around 1 million times larger when it reaches the earth.

So yes , if the sensor is not over loaded, you can make a receiver that works in direct sun light,
but that wont be with the NEC chip which uses a much simpler code, or any other that you can easily get.

Other mechanical things , at the receiver, if you know roughly what direction the IR is coming from, then a simple black tube might help.
 

Yaakov

Joined Jan 27, 2019
3,155
By direct sun light, what to you mean ?

You have chosen a encoder / decoder, that's fine, but me thinks it is designed to work in side,

As others have said,
you need to ensure that the receiver is not over loaded by sun light.
If it is , no matter what you do in SW or at the transmitter, it wont help.

A typical first start is that dark red window used on the front of tv remote controls,
its purpose is to band pass the wavelength of interest to you, and attenuate others,

The next, is to turn the gain down of the receiver,
Assuming the opto itself is not over loaded, this give a chance for your modulation to get through.

Modulation is used for two reasons in Opto circuits.
a) Opto's need a high gain, which is much easier to achieve in a AC coupled circuit than a DC coupled one.
b) mathematically, you can detect a modulated signal that is under the noise,

As an aside, the voyager craft, the signal from there about 20 watt transmitter is around 1 billionth of a watt when it reaches earth, For reference, the power of moon light is around 1 million times larger when it reaches the earth.

So yes , if the sensor is not over loaded, you can make a receiver that works in direct sun light,
but that wont be with the NEC chip which uses a much simpler code, or any other that you can easily get.

Other mechanical things , at the receiver, if you know roughly what direction the IR is coming from, then a simple black tube might help.
If the detector is not saturated, the sunlight should just be a DC offset on which the modulated signal can ride. But if there is no filter and/or shielding, the detector will have no dynamic range left to “see” the small modulated signal.
 

andrewmm

Joined Feb 25, 2011
1,470
If the detector is not saturated, the sunlight should just be a DC offset on which the modulated signal can ride. But if there is no filter and/or shielding, the detector will have no dynamic range left to “see” the small modulated signal.
Agreed

"As others have said,
you need to ensure that the receiver is not over loaded by sun light.
If it is , no matter what you do in SW or at the transmitter, it wont help. "
 

Thread Starter

bug13

Joined Feb 13, 2012
1,954
What are you using as a detector?
This is not a software problem, a different encoding scheme is not going to help.
This is the IR receiver I am using. [TSOP58456]
Do you think it's a HW problem?

You can use any number of codes used in telephone or WIFI. A simple example is Barker Codes. Average the result of demodulation long enough and the noise drops to near zero.

https://en.wikipedia.org/wiki/Barker_code
thanks, I will have a look into these.

What sensor are you using? Do you have an optical IR pass filter in place?
I am using this [TSOP58456], I believe there is already optical IR pass filter on the receiver.

By direct sun light, what to you mean ?

You have chosen a encoder / decoder, that's fine, but me thinks it is designed to work in side,

As others have said,
you need to ensure that the receiver is not over loaded by sun light.
If it is , no matter what you do in SW or at the transmitter, it wont help.

A typical first start is that dark red window used on the front of tv remote controls,
its purpose is to band pass the wavelength of interest to you, and attenuate others,

The next, is to turn the gain down of the receiver,
Assuming the opto itself is not over loaded, this give a chance for your modulation to get through.

Modulation is used for two reasons in Opto circuits.
a) Opto's need a high gain, which is much easier to achieve in a AC coupled circuit than a DC coupled one.
b) mathematically, you can detect a modulated signal that is under the noise,

As an aside, the voyager craft, the signal from there about 20 watt transmitter is around 1 billionth of a watt when it reaches earth, For reference, the power of moon light is around 1 million times larger when it reaches the earth.

So yes , if the sensor is not over loaded, you can make a receiver that works in direct sun light,
but that wont be with the NEC chip which uses a much simpler code, or any other that you can easily get.

Other mechanical things , at the receiver, if you know roughly what direction the IR is coming from, then a simple black tube might help.
Thanks, that give me confidence. I would rather there is a flaw in my design, than what I am trying to do is not physically possible.

In summary:
  • Add a sun shield to the detector.
  • Add an IR filter.
  • Determine if the detector circuit is saturated or not.
  • Type of encoding makes little difference.
Great summary!
 

Thread Starter

bug13

Joined Feb 13, 2012
1,954
Hi team,

Follow up on the same topic here.

I need to send 2 bytes of data, as NEC IR encoding suggested, I need to send the same byte twice with the all the bits inverted. So from the image attached bellow you can see 32 bits (2 bytes + 2 inverted bytes) of raw data.

Screenshot 2021-05-07 121257.jpg

When the signal is not good. (not directly pointing to the IR receiver, relying on IR bouncing off surrounding walls). I can see the raw data of the last few bits are wrong (values = 18), the first few bits are correct.

I can this pattern happen constantly on my current setup (relying on IR bouncing off surrounding walls). My understanding is, if I can decode the first half correctly, why not the second half? Any idea why this happened? Is that possible that I can only send 2 bytes (1 data + 1 inverted byte) at a time per sync bit? Something wrong with my hardware?

Any thoughts?

PS:
I can't easily create a direct sun light interference and have access to my equipment at the moment, but I think this maybe relative.
 
Have you tried playing with the duty cycle of the carrier frequency? Usually, it's a power saving thing. Looks like for r-step it's 33%. https://sourceforge.net/p/lirc/mailman/attachment/20070911083809.C01F06A9FA4@grimoire.wyplay.com/1/

What carrier duty cycle are you using?

Se what happens when you put a piece of plexiglass in front of the detector. It should block UV a bit more. Maybe you have a window on a screen door you can use for a test?

IR bandpass filters are expensive: https://www.edmundoptics.com/search/?criteria=ir bandpass filter&Tab=Products#
 
Last edited:

BobaMosfet

Joined Jul 1, 2009
1,776
Hi team

Is there a way to increase IR communication reliability under direct sun light, with some kind of encoding technique? I am current using NEC encoding, but I find it it's very easy lost data if there is direction sun light on the IR diode.

Thanks guys!
Put a shroud/hood on your IR receiver so it doesn't get direct sunlight. Not only will sunlight blind it, it will warm the sensor creating thermal ghosting/blinding.
 

tindel

Joined Sep 16, 2012
780
I’ve seen the transmitter be designed improperly on at least one occasion. The diode wasn’t turning off completely and messing up the receiver because there wasn’t enough signal-to-noise. It’s worth checking if some of the other suggestions don’t help.
 

Thread Starter

bug13

Joined Feb 13, 2012
1,954
Now I have access to a scope, it appears the (second half of the ) signal is actually missing. I think it's a HW issue. I will keep looking...
 
Top