how to control the range of a IR signal

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Hi team

I would like to be able to control the approximate range of IR signal. How can I best do that?

Say I have a IR LED, and some kind of IR Receiver, assuming using 38KHz IR signal. How can I drive the IR LED to have an approximate range of say 1 meter, 2 meter and 4 meter?

I have tested with adjusting the PWM duty cycle (25%, 50%, 75%) and I don't see a clear cut off distance. I have also try adjusting voltage apply to the IR LED, it seems to have better result (clearer cut off distance).

Is adjust the supply voltage is the way to go?

The IR receiver I am testing with is TSOP38438. And driving the IR LED with 38KHz signal from an Arduino.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Can you use a lens to cause diverging of the emitter's signal? If security is the reason, use encryption.
I properly didn't explain my intend good enough, I would like to control the range electronically in my firmware. I can control the duty cycle and/or supply voltage easily, but it may be a lot harder for me to control a len electronically.

PS: there is no security requirement.
 
Last edited:

jpanhalt

Joined Jan 18, 2008
11,087
I think your only option is encryption. None of the methods you mention will control range reliably, as that range is affected by other factors too. Why don't you think encryption can be used "electronically." (Exception: Play codes flashed in by coaches for college and NFL football.)
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
I think your only option is encryption. None of the methods you mention will control range reliably, as that range is affected by other factors too. Why don't you think encryption can be used "electronically." (Exception: Play codes flashed in by coaches for college and NFL football.)
I meant I don't have a requirement to encrypt the data, and obviously I can encrypt the data if I need to.

So did you mean I can use encryption to control the range of the IR signal??
 

jpanhalt

Joined Jan 18, 2008
11,087
I meant I don't have a requirement to encrypt the data, and obviously I can encrypt the data if I need to.

So did you mean I can use encryption to control the range of the IR signal??
Well then, why do you want to restrict the range? Come on, tell us what you want to accomplish, not how you want to do it. You have enough posts to your identifier to appreciate the need for that.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Well then, why do you want to restrict the range? Come on, tell us what you want to accomplish, not how you want to do it. You have enough posts to your identifier to appreciate the need for that.
Oh, wasn't trying to keep it as a secret or anything.

I need to blast a room with a unique ID through IR signal, and there are other devices that I can pick up the ID and do thing accordingly.

In an ideal world, door to the room is closed and the IR signal will be contain within the room, and that's good. But in real world, people will open door, rooms can be different size etc... So I will need to be able adjust IR signal strength to cover the room accordingly but not too strong to blast the signal to adjacent rooms. And devices outside of the room won't pick the wrong ID etc...

And when I say 1, 2 or 4 meter, and I don't mean to be exactly 1, 2 or 4 meter, can be +/- 0.5 meter, that's good enough.

Obviously we will place the device generating the IR signal in strategic location (haven't sort that part out yet), but that's the idea.

Will these help?
 

MrSoftware

Joined Oct 29, 2013
2,200
Using an open loop type system like you're talking about (no feedback indicating the actual range), you would only able to accurately control the range in a laboratory type setting where you have control over all of the ambient conditions. Changes to the environment will change your range. Things like sunlight or other interference can affect range by introducing noise, temperature of the transmitter and receiver can affect their sensitivity, if there are reflective objects around such as white walls, or no walls such as being in an open space, etc.. These external things will all influence the effective range. If you want to accurately control range you're going to need some additional type of sensor that is capable of actually measuring the distance between the sensors. Or an IR sensor that is capable of calculating the distance between itself and it's partner sensor somehow, probably something time based. A time of flight sensor (TOF), or laser range finder, etc.. something that will close the loop and give you distance feedback would be required.

Edit --> I see you are trying to talk to a number of devices in one room without affecting devices in other rooms. Are these existing commercial off the shelf devices, or are you making these devices yourself? Specifically, are you able to alter the software/firmware that runs on them? If yes, you can have them require a preamble that isn't standard, or encode the data in a non-standard way, so that other devices simply ignore your signals.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Using an open loop type system like you're talking about (no feedback indicating the actual range), you would only able to accurately control the range in a laboratory type setting where you have control over all of the ambient conditions. Changes to the environment will change your range. Things like sunlight or other interference can affect range by introducing noise, temperature of the transmitter and receiver can affect their sensitivity, if there are reflective objects around such as white walls, or no walls such as being in an open space, etc.. These external things will all influence the effective range. If you want to accurately control range you're going to need some additional type of sensor that is capable of actually measuring the distance between the sensors. Or an IR sensor that is capable of calculating the distance between itself and it's partner sensor somehow, probably something time based. A time of flight sensor (TOF), or laser range finder, etc.. something that will close the loop and give you distance feedback would be required.

Edit --> I see you are trying to talk to a number of devices in one room without affecting devices in other rooms. Are these existing commercial off the shelf devices, or are you making these devices yourself? Specifically, are you able to alter the software/firmware that runs on them? If yes, you can have them require a preamble that isn't standard, or encode the data in a non-standard way, so that other devices simply ignore your signals.
Thanks for your reply @MrSoftware

I properly need to explain it a little better. The accuracy is not important, at least I don't think it's important. What is important (in my opinion) is the ability to control the IR signal strength. So I can adjust it as required when setting this up.

And I think it's a good idea to have a non-standard preamble, I think I use implement this.
 

jpanhalt

Joined Jan 18, 2008
11,087
I properly need to explain it a little better. The accuracy is not important, at least I don't think it's important. What is important (in my opinion) is the ability to control the IR signal strength. So I can adjust it as required when setting this up.
That is the point. Why do you need to adjust the strength? There is no environmental or medical need to do that. Can you answer that question? As said before, you are proposing a solution that may not be a reasonable solution to the problem you want to solve.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
That is the point. Why do you need to adjust the strength? There is no environmental or medical need to do that. Can you answer that question? As said before, you are proposing a solution that may not be a reasonable solution to the problem you want to solve.
I think I have explained it in post #7?? If you could tell me which part of the explanation in post #7 need more clarification, I am happy to provide more information.

But in short, I need to blast a room with IR signal (which it will beam a unique ID), and I want this IR signal with the unique ID contain in the room. Hence I want the ability to control the IR signal strength.
 

jpanhalt

Joined Jan 18, 2008
11,087
Attenuating the signal so a particular device won't respond past a certain distance ±0.5 m probably won't work with all other devices. For example, a more sensitive device would respond at a greater distance. Device orientation would also affection reception distance. Of course, individual IR controllers, e.g., TV controllers, have a usable range beyond which the target device will not respond, but that range is hardly +/- 0.5 meter consistently.

Frankly, attenuation of the signal from all the reflections needed to get out a door, around a hallway, and then into an adjacent room may be enough. Are you sure the other devices will be sensitive enough to respond to the broadcast signal?
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Attenuating the signal so a particular device won't respond past a certain distance ±0.5 m probably won't work with all other devices. For example, a more sensitive device would respond at a greater distance. Device orientation would also affection reception distance. Of course, individual IR controllers, e.g., TV controllers, have a usable range beyond which the target device will not respond, but that range is hardly +/- 0.5 meter consistently.

Frankly, attenuation of the signal from all the reflections needed to get out a door, around a hallway, and then into an adjacent room may be enough. Are you sure the other devices will be sensitive enough to respond to the broadcast signal?
Sorry my bad, other devices are referring to the other devices that work with this setup. I have have some control over them, eg firmware, using the same IR receiver IC to have constant sensitives, orientation etc...

And TV etc won't be affected by my IR blaster, because I will be using modified version of NEC IR encoding scheme and using a 56KHz instead of 38KHz. (I know I originally mentioned 38KHz, but I have done more research and decided using a different frequency than the commonly used one maybe a better idea).

What I really need is a way to control the strength of the signal of the IR signal, so I can adjust it while setting it up. According to my test, controlling the supply voltage is the best way to go so far, am I correct?
 

Ya’akov

Joined Jan 27, 2019
9,165
I don’t think you can do this without a modal arrangement. The control of the range will always present a wide array of failure modes, and the bit you haven‘t explained is the reason for the ID.

I surmise (mid reading) that you want things to be “registered” if they are placed in the room. Is this dynamic? Will they relievers move from room to room? Do the devices connect in some other way to the world?

The obvious method is to have a “learn” mode where what they receive is retained until they are told to learn again. But I suspect you want them to be able to change at any time with no intervention, is that correct?
 

Tonyr1084

Joined Sep 24, 2015
7,900
OK, here comes a simple minded answer. But first, a question or two: You want to limit the distance - I get that part. But exactly what device are you trying to control? Is it the IR transmitter or the IR receiver?

OK, here's the simple minded part - may be totally wrong, but here goes: If you want to limit the distance of a transmitted IR signal, just adjust the current going to the IR LED. NO ? ? ? Higher resistance will drop the current and those sensors that are further away will not get enough signal to recognize the ID.
 

BobTPH

Joined Jun 5, 2013
8,967
I am still not getting the problem. If you want the devices in one room to respond only to the transmitter in that room, why not set the receivers to accept commands only prefaced by the unique ID of the transmitter?

Bob
 

Tonyr1084

Joined Sep 24, 2015
7,900
@BobTPH I got the impression the TS is talking about a building with several doors. Each person who has access carries an IR transmitter. When they approach the door they trigger the door to unlock - maybe even open. However, the desired goal is to NOT have all the doors in a given corridor to unlock or open just because of a single IR signal. By limiting the range of the IR only the nearest door will open. Hence, the operational range from zero to 4 meters.

That's my take on it anyway.
 

DickCappels

Joined Aug 21, 2008
10,180
If that were the case it might be best to run the LED at full power and restrict the field of view of the receivers so they only see transmitters in certain areas.
 
Top