Hoping this is the right place for this. Honestly not even sure what to call it. Essentially I need to find a way to detect an object flying through a physical portal/gateway/doorway. I do not care where the object goes through or direction just that it did. I'm looking to detect ping-pong ball.

  • \$\begingroup\$ What research have you done? What is your skill with microcontrollers and circuitry? When asking questings for projects its a good idea to lead in with what you already know. \$\endgroup\$
    – R. Johnson
    Commented Jan 15, 2016 at 14:17
  • \$\begingroup\$ Need more details to answer...here's a few questions to get you started: If it gets close to the doorway but doesn't quite go through, is it okay if the circuit is triggered? What is the maximum speed of the object? Can you modify the object, or the doorway, or both? What material is the object? What material is the doorway? \$\endgroup\$
    – Justin
    Commented Jan 15, 2016 at 14:22
  • \$\begingroup\$ Thank you both for you responses. @R.Johnson I have been looking around and have come across things such as light sensors arrays but they seem to only work on small scale. I have some basic circuitry knowledge but am will do do some research and learning. \$\endgroup\$ Commented Jan 15, 2016 at 14:41
  • \$\begingroup\$ @Justin If I had to guess 10m/s or so. I will essentially be building the doorway so it will be whatever works. the object will be a ping-pong ball as celluloid is the material and that cannot be modified. \$\endgroup\$ Commented Jan 15, 2016 at 14:43
  • \$\begingroup\$ 'Ping-pong ball' is essential information for your question. Why did you say 'golf ball' instead? I suggest you edit and add it in. \$\endgroup\$
    – Transistor
    Commented Jan 15, 2016 at 18:34

4 Answers 4


You can generate a line with a laser using optics. You can focus that line on an array of photodetectors, and detect when the golf-ball-sized object breaks the plane. There are many variants of that idea. The geometry and opticsmight get a bit complicated to cover your whole space.

There are many variations. For example, Instead of a line laser, you could use splitters and mirrors to create a span of parallel rays fine enough to detect your object.


You could use a series of infra-red LED's and IR phototransistors. Industrial processes already use this idea, known as a Light Curtain. Use the dark or opaque kind of LEDs and photo-transistors, as they will be less sensitive to visible light. Place an LED pointing across the opening at a matched photo transistor. Use a lens or piece of drinking straw to make each beam more-or-less linear. Use many of these across the opening (half the width of the ball apart or less.) Repeat on the other axis if you need X/Y coordinates. (Much more work...)

Then energize all of the LED's. This can be achieved with simple constant-current source(s). Then it's just a matter of sampling or detecting changes in each phototransistor's output. It could be done with discrete analog circuitry such as op-amps, however the more practical solution today would probably be a large microcontroller with many analog-to-digital inputs. Sample each sensor very quickly, and compare this value with the last value (or an average value.) If the difference is more than some threshold, sound an alarm.


I was first inclined to say "impossible", but I can think of a possible solution. It's going to involve a lot of learning and probably a few tries to get it right. You could use some high speed cameras (maybe these: https://www.ptgrey.com/grasshopper3-23-mp-mono-usb3-vision-sony-pregius-imx174-camera). They run up to 162 frames per second, so if your ball is moving at 10m/s, that's 6.2 cm per frame. If you can mount the cameras such that their field of vision is at least 3 times that (19 cm), you could conceivably get this working. You would probably want a clear border 20cm around the edges of the doorframe so that the ball cannot come too close to the cameras, otherwise they could miss it. Maybe 1 camera would be sufficient; it depends on the geometry of the opening. This is sounding very expensive, especially considering the computer(s) that would be connected to the cameras.

If you can tolerate a very big, long doorway with a comparatively narrow opening, you could make this project much easier by using lower speed cameras. It might be more appropriate to call it a "tunnel" at that point though.


Caution. This is an 'R&D' answer.

enter image description here

Figure 1. Laser printer scanner. Credit: Jeroen74 - Wikipedia.

The rotating prism sweeps the laser beam across the lens in a repeating pattern. If you can intercept the returning wave you may be able to detect presence or absence of an object. You may need a split-prism or half-silvered mirror to split the transmitted and returning beam.

Possible layout

  • Mount the scanner overhead looking down on the centreline of the table.
  • Run prismatic reflective tape around the frame so that laser light will normally get reflected back.
  • Monitor reflected light level. Trigger when beam is broken.

This is complex but could be a super project.

Take laser safety seriously. Eye damage is permanent. I have no idea what power levels are used in these devices. If it is unsafe you could use the mechanism and a separate laser. Search for 'DIY laser scanner'.


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.