I've been commissioned to create a piece of public art that fuses technology, light, and sound.

The final piece must have six beams that can be broken and trigger musical notes. My first idea was to use break beams sensors and an Arduino or several Arduinos if needed.

I have, however, no background in this type of thing although I am a lighting engineer so have some grasp of basic coding and electronics.

My issue is the gap between the break beam sensor and emitter is around 2 meters. With there being 6 of them next to each other (side by side) I clearly would need an industrial sensor that is super directional.

Is this a silly solution and if so I'm open to suggestions on alternatives? If this is possible then I have no idea what the best components are and could use some advice.

  • 3
    \$\begingroup\$ The solution to this is probably largely mechanical. If you put a piece of tubing with light absorbent paint on the inside over a standard sensor you will get good directional properties. The tubing should be just wide enough for the beam. The beam will need to be fairly narrow and if you are looking at high quality components this is where to spend your money. \$\endgroup\$
    – RoyC
    Dec 29, 2020 at 11:06
  • 2
    \$\begingroup\$ Alternatively you could modulate each emitter with a different frequency and possibly just use a single sensor and analyse the output with your Arduino to spot the missing one(s) . \$\endgroup\$
    – Finbarr
    Dec 29, 2020 at 11:38
  • \$\begingroup\$ You could also make the emitter highly directional, maybe low-power lasers, if safety reasons don't get in the way. \$\endgroup\$
    – ocrdu
    Dec 29, 2020 at 12:02
  • 1
    \$\begingroup\$ You need to provide more information. What is the spacing between the sensors, when you say "side by side"? How much physical room do you have for sensors and emitters? Are the "beams" parallel to each other, are they all vertical from floor to ceiling? \$\endgroup\$ Dec 29, 2020 at 13:02
  • \$\begingroup\$ You can use reflective IR sensor. It has transmitter and receiver in same case and passive reflector. Because you want to install a few close to each other cheap thing may not fit your purpose. Transmitter and received should be synchronized. \$\endgroup\$
    – user263983
    Dec 29, 2020 at 13:07

2 Answers 2


The optical link part of your break-beam project should use a turn-key solution so that attention can be diverted to coding.
Fortunately, the remote-control system we use for TV/Audio appliances is suited to your application:

  • works in daylight
  • copes well with varying environment.
  • has range greater than 2 meters.
  • uses "safe" infra-red light from a LED
  • the LED light source can be driven directly from a microcontroller I/O port.
  • the IR-remote light detector provides a digital signal to a microcontroller I/O port input pin.

Infrared remote receiver (pins are OUT, +Vcc, GND):
infrared remote receiver
An infra-red LED can be driven with a logic signal (with a series-resistor) directly from a microcontroller I/O port.

This signalling system requires that LED be driven ON/OFF with a 40kHz signal. The IR-remote data sheet should show timing requirements. Requiring six separate beams complicates the problem, but encoding each channel with six unique code sequences provides a potential solution.

Since transmitted light from six LEDs can scatter from an unknown and changing environment, expect that each of six IR-remote receivers must discriminate between transmitted code sequences. A blocked beam would result in a code not being received. The microcontroller would look for missing code sequences from six receivers.

These IR-remote receivers are very sensitive, and respond well to reflected light. Confining the LED transmitted beam divergence would help considerably to reduce the reflected-light problem. Many LEDs are encased in plastic with lens with small beam divergence, some to +/- 8 degrees. A tube shroud may help confine transmitted beam even more.
Most IR-remote receivers are designed to accept light from wide angles. You might be able to confine the received beam with a shrouding tube as well.

Your microcontroller will be kept busy looking for six received codes from each IR-remote receiver, but should be able to cope if coded efficiently. It might be wise to enable pull-up resistors to +Vdd on IR-remote output pins.
You might try a simple version first, with all six LEDs transmitting the six unique codes one after another, repeating continuously:


simulate this circuit – Schematic created using CircuitLab


Glen has a great answer, don't upvote me without upvoting him also. I have been making beam-break stuff for a very long time but never thought of this method.

Expanding on his answer... I built a portion of the circuit using a Vishay TSOP38438 receiver and VSLY5940 IR LED. The type of LED is important, it should be a narrow beam at the proper wavelength, with higher than average power. This LED can handle up to 100 mA if necessary to get the required range. The MCU won't be able to drive this much current, you will need a transistor.

The range is at least 3 meters, I can't easily test for more.

To guarantee that the sensors do not receive light from the wrong LED, you should activate the LEDs one at a time. A burst of about 40 pulses is a good amount. At the end of the pulses, read the corresponding sensor. Then send a burst to the next LED. To cycle through all 6 LEDs will require about 6 mS. This latency should be acceptable for your user interface. You could reduce it somewhat by reducing the number of pulses in the burst. For reliable operation, I wouldn't use less than 25 pulses.

The yellow trace is the LED voltage, the blue trace is the receiver response (low = IR modulation sensed). If the beam is blocked, the blue trace will never go low.

enter image description here

Be sure to put a ceramic capacitor close to the receiver.

  • \$\begingroup\$ I tried the similar. It works in open space. If some things around close to sensor receiver is getting reflected beams too. \$\endgroup\$
    – user263983
    Jan 14, 2021 at 1:41

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.