2
\$\begingroup\$

I am working with a 3rd party IR curtain system, and the only way to tell in real-time that something has pierced the curtain is an LED at the top of the sensor pole that changes from green to red when there is an object in the way.

My goal is to grab an image from a 60fps camera at the moment the curtain is pierced by an object (in this case a dog running full speed through the IR curtain).

It has been suggested that a phototransistor (with a filter that only allows red light to pass) can be used to quickly sense when the LED changes color to red.

Beyond that, I am guessing that an Arduino or Netduino could be used to sense the phototransistor change and then send a message to a PC/Mac to let it know to capture the image (or most likely, to grab an image from a ring buffer that is 50-100ms in the past, so it gets close to the exact moment the object passed the IR curtain).

So, my questions to this StackExchange is:

  • Is this a good approach in general?
  • Any suggestions on what phototransistor to use?
  • Any suggestions on where to find a filter that will only allow red or green light to pass to the phototransistor?
  • What is the best way to get a message from a Arduino/Netduino to a host PC/Mac in a timely fashion (I'm guessing RS232 is out for speed reasons - and it seems to USB may be problematic)

EDIT:

Turns out the gel filters are not needed. Since the response curve of the photoresistor is at its peak at around the green wavelength and tapers off near the red wavelength, I can reliably tell the difference between off, green, and red by just the resistance indicated by the photoresistor.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Do you have any access to the wires going to the LED, such as a connector? \$\endgroup\$
    – tcrosley
    May 21, 2014 at 22:09
  • \$\begingroup\$ No, and I wouldn't be allowed to modify the internals of the light curtain poles. I am allowed to attach a mount over the LED though. \$\endgroup\$ May 22, 2014 at 2:50
  • \$\begingroup\$ completely aside: dude, are you my stackexchange-doppelganger? \$\endgroup\$ Apr 25, 2017 at 21:56

1 Answer 1

2
\$\begingroup\$

•Is this a good approach in general?

Yes, although I'd go farther. Use two sensors, one with a red filter and one with a green filter.

•Any suggestions on what phototransistor to use?

No. What you need depends on a bunch of things, such as what kind of mount you can make for your sensors, how bright the LED is, how far from the LED your sensors are, etc. A photodiode may work OK, or even a photoresistor.

•Any suggestions on where to find a filter that will only allow red or green light to pass to the phototransistor?

eBay.

•What is the best way to get a message from a Arduino/Netduino to a host PC/Mac in a timely fashion (I'm guessing RS232 is out for speed reasons - and it seems to USB may be problematic)

Basically, if you're taking 60 frames / sec, anything which responds in less than 1/60 second should do you. A single character at 9600 baud will take 1 msec, so that's hardly a problem.

\$\endgroup\$
6
  • \$\begingroup\$ If you use two detectors you will run into problems when both fire. One should be sufficient. Also, why take 60 samples if you could use interrupts? Less energy consumption, faster and asynchronous reaction. \$\endgroup\$
    – bot47
    May 21, 2014 at 21:27
  • 1
    \$\begingroup\$ You'll note that I specified that one detector has a red filter, the other a green. If both fire, you know that the input was exposed to a high level of white light, rather than the LED being either red or green, and the condition should be ignored or an error message issued. That's why I suggested it. Please read the OP again. The camera is running asynchronously at 60 Hz. \$\endgroup\$ May 21, 2014 at 23:48
  • \$\begingroup\$ Should a gel filter be sufficient? Or will I need to go for a higher priced bandpass filter? I ordered some gel filters to experiment with, so I guess I find out on my own shortly. \$\endgroup\$ May 22, 2014 at 2:51
  • 1
    \$\begingroup\$ At a guess, gel filters will be adequate. However, be prepared for frustration. An indicator LED isn't all that bright, so determining the state of the LED may be challenging. You'll need to pay particular attention to eliminating background light. Actually, you may have to wind up making a housing which completely encloses the LED. High performance, narrow bandwidth filters will help, but of course they'll have to be exactly the same wavelength as the LED. \$\endgroup\$ May 22, 2014 at 3:01
  • \$\begingroup\$ I should be able to create a housing that eliminates all ambient light (i.e. an opaque cup that mounts flush over the LED). \$\endgroup\$ May 22, 2014 at 3:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.