Advice on input IR signal threshold value

Go To Last Post
19 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I develop a DIY laserWar system based on AVR (arduino Nano Every too).

The key parts to send/receive IR signal is TSAL6100 & TSOP4840.

They works well during developing.

But problem rasied while testing on actual environment.

 

The distance between TSAL6100(called sender) & TSOP4840(called receiver) vary distinctly against intensity of illumination.

The lower intensity,the longer distance.

The reason is that IR signal is interfered by the environment light, I think.

 

How to overcome this problem?

 

What I thought of is to provide a steady IR light source to TSOP4840.

That will set a threshold value of input signal, the intensity of signal lower than threshold will be missed.

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:
The reason is that IR signal is interfered by the environment light, I think.

No - this is the basic physics behind what you're observing.

https://en.wikipedia.org/wiki/Inverse-square_law

 

Because the IR emitter shines a "cone" of light as opposed to a sphere, the calculation is slightly different but it's the same effect.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1


Two graphs in the datasheet explain your problem...

 

 

 

 

 

Firstly the detector will see light over a wide angle. At +/-45 degrees either side of where it is meant to be looking it will still accept 50% of the incoming light. So you need to reduce that angle. That means optics.

 

Secondly any ambient light decreases sensitivity to the wanted signal. But that will be reduced by the optics EXCEPT that any ambient light behind your transmitter will still cause a problem. So you need to make sure that doesn't happen by removing the sources of ambient light or filtering it to remove the 950nm component.

 

Note that optics to deal with infra-red light is a specialised field.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

A further thought is to modulate the IR source and look for the received AC signal, through a filter tuned to the correct frequency. This is used by pretty much every IR remote control (and I'm pretty sure there are loads of IR tx/rx pairs that are modulated/demodulated on the part - though I haven't looked). That way the constant light from the environment is simply not seen by the receiver unless it's so bright that it swamps the receiver.

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What I thought of is to provide a steady IR light source to TSOP4840.

That is the opposite of what you want....the chip is designed to filter out steady (ambient) light.  So as mentioned, use a modulated source.  Give the diode a high current, short duration blast, so it sticks out above the ambient. We made IR remotes that worked at 500 feet with the the bright sun right behind you, so it can be done.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As you said,the signal modulated in 40Khz, received and decoded by TSOP4840.

For this is a game set for child, the worked distance should not be too long, especially play in backyard.

So, the current will not be so high(100ma~300ma), and the duration is : 0 : 600us, 1:1200us, spacing:600us, packet head:2400us.(ref to laserTagParts.com)

 

My simple test result:

The worked distance is long enough when the receiver(TSOP4840) placed in dark area.

And the worked distance is much shorter when placed under sunlight.

 

Imagine the scene child playing war game, they will keep moving, sometimes hide ,sometimes rush in the light.

And there will be a strange thing happened: you can hit a target hide in dark in a longer distance,while fail to hit the target under sunlight in a shorter distance.

That will confuse players.

 

The challenge is to get a steady range of fire.

Maybe, it is impossible to get that in a limited budget.

 

Anyway, it is worth to discuss this , I will keep improving this system, must solve(or partly) this question in the future.

 

laserTagParts.com provide an option selection: normal mode or under sunsight mode, provide high current under sunsight.

The limitation is obvious: dark & bright co-exist at the same time.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you,Brian, I didn't notify the fig.6, it is important.

But I don't understand it,could you explain it in detail?

 

In my case, I developed a optic system with 3 glasses, it is really expensive, but the result is good,though not easy to assemble them.

It is impossible to remove ambient light for this kind of application.

 

Ref to your advices, maybe we can do like this:

1) high emission current,that means high irradiance;

2) provide steady threshold irradiance to IR sensor.

 

This solution will :

1) even you stay in darkness, the ambient light to IR sensor is still strong,just like stay under sunlight;

2) with high emission irradiance, the worked distance can be guaranteed still.

 

Sound good,is n't ?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Forget about the 4840 part.

 

why:

However, if you take your TV outside on a sunny day, you will find the range of the remote is severely compromised, or, it doesn’t work at all.

 

Our company did extensive work on rejecting ambient (solar) light pickup, with numerous passive inductive & active light-rejecting designs.  Such as bright sunlight in the middle of the desert on a 110 degree day! 

 

Try this, you will have much success:

https://petermobbs.wordpress.com/2015/06/08/an-infrared-detector-with-enhanced-immunity-to-daylight-interference/

 

For times when you feel like gobbling on some math:

http://folk.ntnu.no/skoge/prost/proceedings/acc04/Papers/0065_WeA12.2.pdf

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Wed. Jun 24, 2020 - 06:31 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Similarly, we've done a lot of work on detecting cats: reflective and transmissive methods, depending on the part. We have to be able to detect the problematical black cat in a cellar at midnight... and he has low-reflectance fur :)

 

Some very careful hardware design so that a single pulse arrives at our ADC exactly when we expect it (there's some commercial IP in there so I can't explain further)... but it doesn't help the OP.

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies:

What is the reason of TV case?

The sunlight is too strong that signal overwhelmed?

Or the noise is too much / too strong?

 

And there is a question for me:

Source A klxA    ------------> Target  C  klxC

Source B klxB    ------------>  

 

klxC = klxA + klxB ??

or klxC = max(klxA,klxB)?

 

Last Edited: Wed. Jun 24, 2020 - 09:14 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:

Thank you,Brian, I didn't notify the fig.6, it is important.

But I don't understand it,could you explain it in detail?

 

Your detector is designed to receive light with a wavelength of 950nm. Sunlight contains a lot of light at 950nm. (950nm is infra-red).

 

In dark conditions, to the left of figure 6, your detector will trigger when it sees a light pulse which causes 0.1 mW/m^2 to fall on it.

In bright conditions, to the right of figure 6, your detector will need a pulse of 4.5 mW/m^2 to trigger.

 

That means that strong light makes your detector 45 times less sensitive.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian:

Thank you for your explaination,it is very clear. I was confused by the "DC" in "ambient DC irradiance".

 

It is very clear that source illumation must be increased while ambient irradiance getting strong.

 

So, my way to set default high threshold will work.

I will try to test it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:

I was confused by the "DC" in "ambient DC irradiance".

 

I think they mean that the ambient light is steady, just like a DC voltage, whereas your signal is modulated, like AC.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What is the reason of TV case?

Outdoors, the detector is simply overloaded by solar & more extreme measures are needed to overcome it....it is literally 1000's of times bright out there than in your living room!

 

So most TV remote type chips are not much use out there.  If they automatically turn down the gain (AGC) to adjust for a more optimal setpoint, with super bright solar, they end up with no actual signal left.

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Wed. Jun 24, 2020 - 04:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


I need turn to other way if it is true under sunlight.

I'm not hardware engineer, not understand the circuit you gave.

How about the max value of  input frequency? can up to 40Khz/56Khz? it is only 10Khz in your case.

I just need to detect the voltage(Ua) through ADC pin?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Go ahead and use 10 KHz, you do not need to use 40 KHz for your laser game, though the circuit make wor fine or need some optimization for higher freq.

 

40 KHz is too fast for the ADC.  You'd probably want to use the analog compactor, or maybe just treat it as a digital input.  First build the circuit & take a look at your output (taken from the 15K resistor)

 

I'm including this interesting link, in case I ever look up this question again:

 

http://www.modulatedlight.org/optical_comms/optical_rx1.html

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Thu. Jun 25, 2020 - 02:25 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:

How to overcome this problem?

What I thought of is to provide a steady IR light source to TSOP4840.

That will set a threshold value of input signal, the intensity of signal lower than threshold will be missed.

Interesting idea, you would need to experiment with.

 

Any sensor will have a swamping effect, from daylight.

 

You would need to plot the daylight vs distance degrade effect, to see if it is predictable enough, but your added-desensitize approach is more parts & power, as you need a daylight sensor, and a local emitter

 

An appeal of the  TSOP4840 type packages is their simplicity.

 

You could look at external-sensor amplifiers, as you can get the AGC/Electronics part minus the optics  - they have 2 types, faster ones for code learning (they have less range, but better signal following) and tuned types that have simpler longer distance operation.

These need an external PIN Photodiode 

 

https://www.vishay.com/ir-receiver-modules/vsop/

 

Then, you could experiment with active-loads, and inductor tuned (L+C) circuit loads, and because you now have access to the Photo Diode node, you can experiment with more direct resistive shunt desensitize. (easier and lower power than optical desensitize)

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tested under sunlight(strong), it is interfered seriously indeed, the distance is too short to be practical.

it still works fine without sunlight irradiated directly.

 

 

You are right,TSOP4840 will reject to work :)

 

Need to change the system structure if using diode directlly.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You might take a look a this part...fast & easy to try out, not sure if it compares as well as the Pease circuit (#15)

 

https://www.analog.com/media/en/technical-documentation/data-sheets/1328f.pdf

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!