Musical Staircase

Hello, Arduino World!

I have a staircase at home with 13 steps and 3 landings, and I would like to make a musical staircase with it.

The basic idea is to use an Arduino with infrared LEDs/sensors (a pair for each step/landing) and a Bluetooth module (to send a signal to a PC or smartphone to play a different sound for each step).

Since I have never used IR to detect motion/presence, that's where I'm scratching my head right now. I'm not sure what would be better: A) to detect when the beam is obstructed, or B) to detect when the beam is reflected.

In case A), I have to put a LED in one extreme of each step and the sensor in the other. In case B), the LED and sensor are placed side-by-side (on the same side of each step), which would make implementation a lot easier for me.

In any case, is it possible to make the detection using digital inputs? And what kind of sensors would you recommend? I read about using LEDs as sensors (Arduino Playground), using only digital pins, while it seems that most IR receivers uses analog input (which would require some kind of multiplexing and/or more hardware)...

I would appreciate your comments, thanks!

Case A) and detecting when the beam is obstructed is less complicated to implement. There's less sensitivity involved but it does force you to run wires down both sides of the stairs.

Using regular LEDs for detectors won't work well for long distances. The least expensive emitters/sensors to use would be 5mm infrared -- INF5940 and INFD5940 are common and should work well for the width of a stair. If there's any sunlight involved you'll need to shroud them with some opaque tube or black tape, etc. or probably just plan on shrouding them no matter what.

One thing I would suggest is that you write your sketch to blink your emitters on and off every millisecond or so. In doing this you can verify that all of your IR detectors are seeing signals from their respective emitters and not from ambient light. If you used IR receivers (three pin types that are used with TV remotes, etc.) the receiver has built-in circuitry to avoid interference, but those receivers are usually around $1/ea. Beware that most IR receivers of this type force you to adhere to a certain encoding in the signal sent from the emitter; some, like TSOP4038, allow a constant 38Khz beam and are easier to implement in that respect -- but they're a bit more expensive.

Thank you for your feedback!

I've been reading about IR photodiodes, phototransistors and receivers. The INFD5940 seems to be a LED being used as a photodiode... am I right? In that case, can I use the sketch / circuit on the link I posted before, or do you have a better suggestion?

I'll see if I can source the suggested parts (or equivalents) locally. Thanks again!

you mean something like this - Musical Stairs in Milan - YouTube -

Yes, something like that! :slight_smile: But without decals...