The instrument wheel turns using a stepper motor and displays the current instrument sound of the laser harp. When stepper motors are used for many projects, you need to know the position of the motor. For example, stepper motors with lead screws in 3D printers need to be calibrated so that the extruder doesn't run into the end of the rails. Some motors have outputs to signal their relative positions, but most motors just keep stepping.
In the first version of the laser harp, I used a Hall Effect sensor to "home" the instrument wheel. The motor would turn one step and the Arduino would read the output of the Hall Effect sensor. When the sensor was over the magnet, the signal would change. With this procedure, one knows the position of the instrument wheel and can sync the MIDI instrument being played with the panel displaying the instrument.
The Hall Sensor worked fine for one system, but it isn't the best setup for building more laser harps and making kits. I am worried about dealing with small magnets and glueing them onto the wheel in the correct position. The challenge is even greater for bipolar Hall Sensors because the build requires getting the magnet orientation correct. Error in the positioning of the magnet could be offset in the code, but I want better repeatability in the hardware.
Therefore, I switched to a photointerrupter for the instrument wheel home sensor. A photointerrupter has an IR emitter and phototransistor oriented towards each other. When something gets in the way of them, the phototransistor signal changes. The object getting in the way is called a flag and is positioned at a location for homing the motor.
I redesigned the instrument wheel for this new type of home sensor. One of the panels on the wheel is extended. As the motor rotates, the photointerrupt is read by the Arduino. The path between the IR emitter and phototransistor is blocked only when the one spoke passes through.