Author Topic: VS1838B (TSOP4838) for a beam break IR detector.  (Read 2559 times)

0 Members and 1 Guest are viewing this topic.

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 70
  • Country: 00
VS1838B (TSOP4838) for a beam break IR detector.
« on: September 25, 2018, 08:37:11 pm »
I'm trying to design a mid range barrier (about 10 pairs or more of emitter receiver) beam break IR detector. (2 to 3 meter range)
In my country I don't find many varieties of components, at least not as a hobbyist.
The best emitter that I found was the TSAL6200, but I would have to drive at 1A to get a good mW/sr (about 600mW/sr). Since I'm planning on use several emitters I'd like to avoid using this much power.

In my experiments the modules such as VS1838B are more sensitive than regular photodiodes and phototransistors. (The best phototransistor I found was the PTC334-6C and per the datasheet I would need Ee = 1mW/cm² therefore a 600mW/sr emitter would work at a maximum 25cm, if I get the theory right Ee = Radiant Intensity(mW/sr) / Distance²)

My thoughts were to use a uC PWM and a regular transistor to drive the emitter at 38kHZ with 100mA and direct it at a VS1838B so the output goes LOW. I don't know the emitter I'm using because I got it from an old TV remote control.

But here is what happened: The only time my output went LOW was when I started the emitter (it would be LOW for half a second) and if I broke the beam it would go LOW very briefly (just a blink) after I stopped breaking the beam.

Shouldn't the output be LOW as long as the receiver is irradiated with 38kHz? And only go HIGH when I break the beam? Or perhaps I'm doing something wrong?

PS.: I'm going to buy some FSH 4550 (good radiant intensity with 100mA) from aliexpress but it will take a lot of time and I don't want to pause this project.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1718
  • Country: gb
Re: VS1838B (TSOP4838) for a beam break IR detector.
« Reply #1 on: September 25, 2018, 08:59:20 pm »
The modules have quite a bit of circuitry in them including an AGC (amplitude gain control) amplifier.  This allows it to be very sensitive and pick up remote control flashes bouncing off walls, whilst not being "blinded" by someone using the remote up close.  They also have bandwidth and expect a changing signal, not just modulated at 38kHz but also pulses, which is what remotes use.  They aren't designed to pick up constant 38kHz carrier. 

To get around this you would have to double modulate - modulate the emitter at 38kHz, but also modulate this at say 1kHz.  This is trivial for a microcontroller to do, you really just create say 30 pulses with on and off times of 1/38/2 = 13.2us.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16385
  • Country: za
Re: VS1838B (TSOP4838) for a beam break IR detector.
« Reply #2 on: September 29, 2018, 08:07:12 pm »
To get the current down in the transmitter you run the IR emitters at 1A each, and as you are going to use a few of them put them in series, and use a power MOSFET to drive them, with a large value ( 1000uf low ESR) capacitor in a small area close to the emitters. Drive with very narrow pules, around 1us each, and you will have a low average current, but high peak current and thus high output.  As above you need to have both the 38kHz modulation and the lower frequency modulation to get the receiver to function, so use a microcontroller to make it, or just have 2 oscillators using CMOS gates making them, and use an or gate to get the final signal. Receive wise you just are looking for lost pulses, so either a microcontroller input and it resets a timer on the edges, and if the timer overflows because of no signal you have an output, or just use the signal to drive an AC coupled emitter follower amplifier, which has as emitter load a RC that will feed a comparator, RC being such that the input being absent for 3 cycles (or more) means the comparator changes output state.
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: VS1838B (TSOP4838) for a beam break IR detector.
« Reply #3 on: September 30, 2018, 04:49:31 pm »
The datasheet for a TSOP IR receiver explains that it reduces its sensitivity when it receives steady IR from light and when it receives steady 38kHz from a compact fluorescent light bulb. The datasheet talks about its burst of 38kHz length and required gaps in its reception of pulsed data for it to have high sensitivity. Maybe you can design your beam to have the required bursts and gaps of 38kHz.
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 70
  • Country: 00
Re: VS1838B (TSOP4838) for a beam break IR detector.
« Reply #4 on: October 01, 2018, 08:27:28 pm »
Thx for all the responses.


Here is my idea for now:
I will use a 556; 556a output at 120Hz with 10%D.C. to switch a transistor (Q1), the emitter of Q1 goes to the collector of Q2 (another transistor) that is switched at 38kHz. The IR Emitters will go on the collector of Q1. 100mA on the emitter was more than enough for the distance I wanted.
P.S. I may use an ATtiny85 instead of the 556 to get these two PWM

An important detail, for those who don't know, is that when the VS1838B doesn't have IR light on it the output is HIGH

This way I was able to get a LOW on the VS1838B with 120Hz Signal. What I have to do now is to keep the output always LOW.
So far I've come up with two ideas.

1) Since I'm using a uC, the first one is to use the timer on the uC to create a frequency counter and if the frequency measured is different than ~120Hz I'll know that there is something blocking the beam. I want to use several VS1838B, about 15 spaced of 3 or 5 cm, so I'll have very few space where it will not detect the presence of the object, but since the objects will have more than 5cm I'm ok with that. My problem with this solution is that, since I'm going to use several IR Receivers, if I use them in parallel I would have to block all beams for my uC doesn't see the 120Hz signal. And I'm not sure if I can use them in series. (I only have one with me, already bought some more, but takes some time to arrive).

2) The second idea is to use a small signal transistor after each output to invert my signal. So now if my emitter/receiver is unblocked I should get HIGH output at 120Hz and use a Capacitor to eliminate the AC component and get a constant HIGH signal, if the beam is broken the output goes LOW. My problem with this solution is that I would have to wait for the capacitor to discharge to get the LOW signal and I'm afraid that the RC time to keep HIGH all the time it's going to make too slow to get to LOW, I haven't done theses calculations yet, will do when I have a bit more time.

If you guys have any suggestion I would appreciate it. Thanks
 

Offline MasterT

  • Frequent Contributor
  • **
  • !
  • Posts: 851
  • Country: ca
Re: VS1838B (TSOP4838) for a beam break IR detector.
« Reply #5 on: October 01, 2018, 08:45:47 pm »
If it's permanent installation, you may use IR lasers, lowering current to mA.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1718
  • Country: gb
Re: VS1838B (TSOP4838) for a beam break IR detector.
« Reply #6 on: October 01, 2018, 08:53:11 pm »
Although the use of IR remote modules seems ideal - with their low costs, and built-in amplifier, AGC, filters etc..  I'm wondering if for your 2-3m range they might be more hassle than they are worth.  They are designed for quite long range and therefore extremely sensitive.  Also, it depends where these beam breakers are used - any tv remote will trigger/fool them.  They also tend to have quite wide fields of view - by necessity which is the opposite of what beam breaking circuits need.

For that range, whilst it is quite a big hassle to create a narrow filter, using a custom frequency might be better.  There will always be a delay between the beam being broken and the output changing - its just a question of how much and how much of a delay you can tolerate.   

I am not suggesting you give up on them, its all about testing, and if they suit your application, fine.  I'm just mentioning some downsides to using them that may or may not be deal breakers for your application.
 

Offline 6PTsocket

  • Regular Contributor
  • *
  • Posts: 212
Re: VS1838B (TSOP4838) for a beam break IR detector.
« Reply #7 on: October 02, 2018, 01:51:09 am »
Where  I worked there were many hundreds  of IR pairs, some spanning a couple of feet, across conveyers. They ran on 5 volts dc. No pulses, no 38khz. The recievers and transmitters were in modules that mostly had a split case and clamped to a post. They all had lenses to concentrate the beam. They worked in high ambient light and dirty conditions. The output was 5 volt logic. With the right stuff it does not have to be complicated. I maintained aimed and replaced them for a lot of years.

Sent from my SM-G900V using Tapatalk

 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 70
  • Country: 00
Re: VS1838B (TSOP4838) for a beam break IR detector.
« Reply #8 on: October 02, 2018, 01:25:13 pm »
Thx for all your replies.

If it's permanent installation, you may use IR lasers, lowering current to mA.
With the VS1838B I'm able to use a simple IR emitter as TSAL6200 with 100mA, so there is no need for IR lasers which I believe will cost way more than the TSAL6200.

Buriedcode,

Thank you for your inputs, this sensor will be used indoors in a confined space and low height, very close to the floor. So tv remotes should not be a problem. So using custom frequency, might be a good idea, but may not be necessary. I will see as the project develops.
Once again thank you for your inputs.

6PTsockekt,

Thx for your comment.
English is not my first language and I'm not familiar with the word "spanning", but I guess from the translation and context this should mean the distance between them. But a couple of feet is way less than what I need. And to make a bigger range will need more amplification, which will make the receiver get all the others IR signals (which is everywhere) so may not be able to detect when the beam is broken. But using a pulsed signal I can know if the IR signal received is the one from my emitters or from another source e.g. fluorescent light
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf