Infrared pulse type for a light barrier? - Page 1
Forum section: electronics / beginners

author: cdevidal
author_rank: Regular Contributor
timestamp: February 01, 2025, 12:59:58 pm
content: Need to create a 30-60cm infrared light barrier in an outdoor environment. The transmitter and receiver will be across from one another on each side of the path.Vishay's TSSP4038SS1XBis designed for this type of application (they recommend pairing with aTSAL6100 LEDand they say I shoulduse an aperture) but I'm not quite sure how to shape the pulses, and searching Google I couldn't find the answer. I know I must transmit 38kHz carrier frequency but I'm not clear if Ialsoneed to pulse that on top for the receiver to work accurately.Thedatasheetshows an optical test signal with 30 pulses in 10 ms, so do I need to pulse the carrier signal on-and-off at 3kHz? Or just blast a continuous 38kHz carrier and done?

author: BeBuLamar
author_rank: Super Contributor
timestamp: February 01, 2025, 01:12:41 pm
content: Just pulse it 38kHz. Off the shelf sensors designed for the same purpose work the same way. If I were you I just use off the shelf sensors. Buying from Ebay is quite cheap.

author: Kleinstein
author_rank: Super Contributor
timestamp: February 01, 2025, 01:15:38 pm
content: The TV type IR receivers work much better it there is not just the 38 kHz modulation, but also the extra ~ 10 period bunches.If the use is most of the time no light and looking for the start of getting light, it may work without the extra 2nd modulation.As a sidenote: the 38 kHz modulation is ideally not 50% on 50% off, but only something like 20-35% on. This is a bit more effective. The last few percents towards 50% have no more effect.

author: cdevidal
author_rank: Regular Contributor
timestamp: February 01, 2025, 01:20:21 pm
content: Quote from: BeBuLamar on February 01, 2025, 01:12:41 pmThis specific sensor is also cheap and widely-available. Got some for the prototype off Ali for78 cents each.

author: cdevidal
author_rank: Regular Contributor
timestamp: February 01, 2025, 01:26:20 pm
content: Quote from: Kleinstein on February 01, 2025, 01:15:38 pmYou're describing the duty cycle, correct? This is my first time doing PWM

author: RoGeorge
author_rank: Super Contributor
timestamp: February 01, 2025, 01:59:30 pm
content: When it's a logic '1' of, you send in fact a train of 38kHz on/off pulses for the entire duration of the logic '1' level.For logic '0' you send nothing at all, the IR LED is not powered.- Duty factor doesn't matter much. The smaller, the lower the transmitting power, but if you make it too small, the receiver might not see it. The receiver is in fact a detector of 38kHz pulses. The receiver will output a logic '1' when it sees infrared chopped on/off at 38kHz.- Wave shape doesn't matter much. Can be square, sinus whatever. Usually is square wave 38kHz.- 38kHz doesn't matter much. Can be whatever IR remote, 39, 41, etc., the receiver will see those too, it is not very selective. Will see whatever IR wiggles fast enough, but if it's a 38kHz receiver, the maximum sensitivity will be at 38kHz.The receiver is very dumb, it will output a logic '1' when it sees some 20...50kHz infrared in the air, that's all the IR receiver does. Does this analog style, no DSP and nothing smart (nothing digital) inside the IR receiver IC.As you will see in practice, pretty much nothing matters much. However, what DOES matter a lot is the height of the light barrier measured from the ground, and this is why:https://youtu.be/KX2_LCUkhDs

author: Kleinstein
author_rank: Super Contributor
timestamp: February 01, 2025, 02:07:26 pm
content: Yes this was about the duty cycle.The typical receivers for TV remotes have some automatic gain control. This way a moderately weak contineous 38 kHz signal is not longer received as a reliable on, but more like just at the edge. The linked type is a special type for a light barrier and would not need the extra (e.g. 3 kHz) modulation.An aperture at the receiver can help. There are LEDs with different opening angle the linked type with 10 deg. is somewhere in the middle. There are also types with a smaller angle, that can help with longer distance.

author: SteveThackery
author_rank: Super Contributor
timestamp: February 01, 2025, 04:09:51 pm
content: Quote from: RoGeorge on February 01, 2025, 01:59:30 pmI don't understand why you would do this for a light barrier. Aren't you just looking for a continuous 38kHz signal which gets interrupted by someone's legs?

author: RoGeorge
author_rank: Super Contributor
timestamp: February 01, 2025, 06:10:11 pm
content: The explanation was about how the receiver works. The receiver is made for IR audio-TV remote controls, so the remote sends a different sequence of logic 0s and 1s depending on which button was pressed.As for why might anybody want to send a '0' for a barrier, IDK, maybe it's a battery powered barrier, where the battery life is important. In that case, instead of keeping the LED at 38kHz at all times, would be more power efficient to start the 38kHz pulses for a brief time, for example by sending a short logic '1' once at every 0.1s or so.

author: Kleinstein
author_rank: Super Contributor
timestamp: February 01, 2025, 07:50:38 pm
content: Sending 0s (e.g. like pauses of some 1 ms or so) is not just for power saving. If one uses the really cheap TV remote receivers, this is also because of the AGC part. These receivers are not working well with a contineous 38 kHz signal as they would reduce the sensitivity too much. They are more made for a signal like 10 periods on and 20 periods off with the 38 kHz modulation. The detection would thus tell apart a true interruption and the normal pauses.The receivers mage for light barriers would be OK with a contineous 38 kHz signal. This would be the easier to use and generate the IR signal.

author: cdevidal
author_rank: Regular Contributor
timestamp: February 01, 2025, 08:11:00 pm
content: Quote from: Kleinstein on February 01, 2025, 07:50:38 pmI thought it was a good choice since right at the top of the datasheet the title says, "IR Receiver Module for Light Barrier Systems" and not TV remotes or some such. Just foundTSSP93038SS1ZAwhich seems to be a better choice; The first one above barely mentions sunlight in the datasheet but for this onethey boast about its sunlight performance. It's not available on Ali or eBay butMouser has them for about the same price--expected to be in stock March 3rd.

author: Terry Bites
author_rank: Super Contributor
timestamp: February 04, 2025, 12:10:04 pm
content: Its more power efficent to use bursts at a low duty cycle. I have used a 4093 for this. You may have to tweak R3 for 38KHz. The output current limit resistors should be chosen to give the desired LEDcurrent at your Vdd.

author: Kleinstein
author_rank: Super Contributor
timestamp: February 04, 2025, 01:58:56 pm
content: Ideally one would also want a reduced PWM ration also for the 38 kHz, e.g. with R3.One could skip on the diode D1 with the larger resistor.