Go Down

Topic: IR break beam sensor (Read 828 times) previous topic - next topic

c_breeez

Hi, I am trying to create a break beam sensor using infrared.

I want to mount the detector 30cm away from the emitter. When an object passes through the beam I should be able to read this with my arduino.

I tried with this to begin with:
https://www.sparkfun.com/products/241

this was successful when transmitting the beam over about 4cm. It read 39 over analog when there was a beam and 999 ish when the beam was interrupted.
When I tried this over greater distances the performance worsened the further I moved them apart. At 30cm it is really unpredictable and its performance is affected greatly by the level of ambient light in the room.

So I am looking at other solutions. I saw this article/ project: https://www.sparkfun.com/tutorials/282

They have created a successful break beam over what looks about 6ft of distance. They said they used this receiver:
https://www.sparkfun.com/products/10266

I am just wondering what emitter they paired it with. He states that he got the emitter emitting at 38Khz using code.
I was wondering if you can ready buy emitters that emit at 38khz?
Either way can anyone suggest a good emitter to pair it with. I am looking at this:
https://www.sparkfun.com/products/10732

Would it be easy to drive this at 38khz using pwm or something?

Thanks for any help you can offer, Will offer much karma in return ! :)

Chagrin

You want the part TSSP58038 or TSSP4038. The TSSP58328 is OK, but you have to send it specially patterned codes rather than the plain, boring, 38KHz signal that the 58038 or 4038 allow.

Then read: http://www.righto.com/2010/03/detecting-ir-beam-break-with-arduino-ir.html

You can create a 38KHz beam with a 555 timer or an ATTiny or such. Just depends how cheaply you need to make your transmitter where size or price is an issue.

You can reliably expect ~3' distance with a 20ma red LED as the emitter, 6' with a 20ma white LED, 10' with a 20ma IR LED, and "lots" of distance using a cheap, red laser pointer.

c_breeez

Hi thanks for the advice,
Im using a TSOP38238 to receive and a 950nm infrared led.
It seems to work if I just blast the receiver with 38Khz, no codes, and it recognises when the beam is broken.
So all seems to be pretty sweet, but if i have any issues il look at those other sensors
Thanks

Chagrin

I would have expected you to see problems; the datasheet for the TSOP38238 states distinctly that it needs a 10 pulse pause after 70 consecutive pulses.

c_breeez

So those other models dont need the 10 pulse break? and I can just blast them without codes with 38khz IR LED?

c_breeez

Just so you have a clearer picture of what im doing,
Im running the led through a 330 ohm resistor. one side runs to ground, the anode side runs to digital pin 4 on an uno.

Im using the tone( ) func to put a 38khz frequency over that wire out of pin 4.
Seems to work, I cant see it pausing, is it because im not sending codes and merely just turning the led on?

I might wish to send codes, I havent totally figured it out yet, if so which of the two sensors you mentioned is the best at blasting straight IR at 38khz with no breaks

Thanks again

Chagrin

TSSP58038 and TSSP4038 are essentially identical -- just differently shaped packages.

You say you can't "see" it pausing; do you have a circuit with the TSOP38238 lighting an LED (etc.) to see when the beam is open/closed? Because it might actually be forcing pauses but blinking so quickly that you can't see it.

I just didn't expect it would work so I'm saying you should double check things. Don't read into it any more than that :)

c_breeez

Ok cool, just looking into this now, do you know anything about the viewing angle of these sensors?
I am planning  to use a few beams close together but want to avoid inteference. I am using a ir led with a narrow viewing angle.
I cant figure out from the data sheets which has the narrowest viewing angle out of the 4 or 5?
or do you think this might not be an issue if I use a led with a narrow viewing angle?
Thanks

Chagrin

Just enclose the IR receiver in a short tube to shade it from other nearby emitters.

didu77

Hi IR guys, would you peak into my issue at "Light sensor reading problems"... i think you got the knowhow to see what's wrong.

Thanks!

c_breeez

I picked up some TSSP58038 to test them out the other day.
I read the data sheet and they said they can take continuous bursts and the datasheet from the TSOP 3* says they need breaks.
The TSSSP5 also says its made for break beam applications. Where as the TSOP3 is made for remote control etc.
So I was convinced the TSSP5 would perform better. So I picked a few up to test.
Strangely they performed far worse than the TSOP3 and were pretty unpredictable.
The TSOP3 is solid and works perfectly for this application as far as I can tell, whereas I had real problem with the TSSP5.

Is real strange, the datasheets make the TSSP5 sound like the perfect choice for this application.
Either ways thought Id post this incase anyone else reads this post when trying to make an IR break beam.

Thanks for all the advice, I totally agree with you that the TSSP5 *should* be the perfect choice for this application and the TSOP3 in theory should be buggy, but it is strange how it works out.
Thanks again

Chagrin

Two things with respect to unreliability:

1) Receiver is in bright light / direct sun. This causes it to send lots of spurious signals.
2) The datasheet recommends use of a capacitor and resistor near the receiver to filter out dirty power. I didn't need that myself and was using ~1 meter cables to connect the receivers, but y'know.

Other than that, I dunno. Your results are interesting to say the least.

Go Up