which IR Beam trip wire method with <3ms output response

Hi ,

Very new to Arduino but cant wait to get started! would just like a little bit of guidance as to which products to buy.
1st off my project is for timing a dogs flyball training :

2 4ft high garden posts with 4 ir beams across a 4ft opening called the “trip gate”
the 1st beam 8 inches from the bottom, then 7 inch gap to the next one above, then 7 inch gap to next one above…
push button starts a (negative) -4000 ms timer,
at -3000ms an amber lamp lights on the right post
at -2000ms another amber lamp lights on the post (think formula one lights)
at -1000ms the third and final amber lamp lights
at 0000ms a green lamp lights
if any of the beams are broken by a running dog during the negative countdown above, a red lamp lights on the post and the negative time is output to a 7 segment led display (i.e -0.039)
else - the current time of the 1st beam broken is output to a 7 segment led display showing the time (i.e. +0.016)

The aim is to get the dog to hit the “trip gate” as close to 0.000 secs as possible. different height dogs and maybe the stride of the dog would trip a different height ir beam hence the 4 differing beam heights. if the dog is hitting the trip gate too early - before 0.000 then the handler needs to release the dog later using the amber lights and markings on the floor. I hope that all makes sense so far!

I have done a lot of research and discovered that the Banner world beam QS18VP6LP photoelectric sensors are <1ms response.

however… at $66 each it is way beyond my modest budget to purchase 4 of these… especially for just a prototype.

  1. Can anyone recommend a cheaper solution for the beam trip wires that would still have a <3ms response. a 3ms delay is deemed acceptable! Training usually indoors. in a sports hall. under fluorescent lighting. I could sink the ir beams into the post and use black conduit to help with the outside lights. I would like to avoid trailing a cable with receivers over to the other post - but if that results in a cheaper solution especially for a prototype, then that would be fine. performance is more important than set up time at the moment.

  2. Can anyone recommend a 7 segment digital led display about 4inches high and 12 inches wide?

  3. Can the Uno handle this or would i need the mega?

  4. the red, amber and green lamps need to be an inch diameter size- any recommendation appreciated please.

I appreciate any help

It would have been more helpful if you had provided a link to the device

I would have though a photo transistor would give a much faster response for a few pennies - but maybe that device has clever features to make it especially reliable.

An Uno should be well able to handle the project.

I will leave it to others to comment on the other parts - I suggest browsing the sites of some of the online parts suppliers.


Search the forum for "TSSP4038". That's 1/38000ths of a second (.000026) accuracy.

ok thanks for the replies guys

Search the forum for "TSSP4038". That's 1/38000ths of a second (.000026) accuracy.

hi Chagrin,
ive done a lot of research since first posting and have purchased the TSSP58038. http://www.vishay.com/docs/82479/tssp58038.pdf which I believe are the newer TSSP4038's.

I now need 8 of these and am looking to set them up as inputs on Port registerD pins 0-7 on the uno, so I can get a faster response time as i just need 1 beam to break to trigger a function. that leaves me with 12 pins left. I will be using shift registers to light 17 standard leds at varying intervals, and another 4 output pins for a different type of shift register that will sink more current for the 9 volt 7 segs i am using....
that leaves me with 4 outputs to power 8 TSAL 6200 ir emitters http://www.vishay.com/docs/81010/tsal6200.pdf.
Can I use shift registers such as the 74HC595 http://www.farnell.com/datasheets/1561729.pdf, to power the 8 IR emitters? I have read that these need to be 38kHz PWM.
the code here
Detecting an IR Beam Break with the Arduino IR Library is exactly the code I was going to use - however i only have 4 output pins left and need to power 8 ir emitters.
Is an arduino mega the only option?


I'm pretty certain that the TSSP58038 differs from the TSSP4038 in the physical shape of the package only. Whichever one is cheaper is the one you want :wink:

See http://forum.arduino.cc/index.php?topic=79439.0 as to how you can light up your eight, IR LEDs with one pin. Read all the posts so you understand the differences between using a mosfet and bipolar transistor.

TSAL6200s are very bright IR LEDs and not really needed unless you have a wide area for your beam (more than 10 feet). You should anticipate only needing very little current for them -- 5ma to 20ma. And while you're buying parts you should grab some basic, visible white LEDs also. A white LED is certainly a better choice while you're testing and will likely be better for your finished project so you can verify all your gates are lit up out in the field. IR light also messes with cameras which you might not want. The disadvantage is that you only get, perhaps, a third as much beam distance as with an IR LED, but again if your gates are narrow that's not an issue.

thanks again chagrin - thats exactly what im looking for. think ive got my head around it. basically I use one pin on the arduino at 38KHZ which switches (using a mosfet) the led emitter array to ground at that freqency?
i will be using a 12v power supply, so could use led's in serial hopefully depending on led specs.

And while you're buying parts you should grab some basic, visible white LEDs also. A white LED is certainly a better choice while you're testing and will likely be better for your finished project so you can verify all your gates are lit up out in the field.

just out of interest - can I use any colour led's as emitters? I have 50 RGB leds kicking around - from here http://www.amazon.co.uk/dp/B00F4MGA0I/ref=sr_ph?ie=UTF8&qid=1413367347&sr=1&keywords=rgb

there is no datasheet I can find for these, but was thinking I could just ignore the red and green anodes, and just use the blue for example? they are rated at 3v so would use them in parallel with correct resistors.

another question please . The arduino will be about 8 metres away from the LED emitter array/mosfet. would 8 metres of cat5 twisted pair be ok to send the pin1 PWM, and then 12v+ from the battery and ground back to the arduino?

From my testing a white LED will work for ~3 meters, a red LED for ~1 meter. I don't think I tested with green or blue.

I would expect the 8 meter cat5 would work OK for your LED emitters. If it doesn't though, don't forget you can always just buy an inexpensive Arduino micro or even a 555 timer to handle the LED blinking and cut down on how much wire you're running around the field.