Electronic – arduino – Need help with break beam sensors for an art installation

arduinoinfraredphotosensorraspberry pi

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.

Best Answer

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:

schematic

simulate this circuit – Schematic created using CircuitLab