Student Projects

cancel
Showing results for 
Search instead for 
Did you mean: 

myDAQ Staircase

AE NI myDAQ Video Contest:
Musical Staircase

Presented by: Will Schoettler, Douglas Farrell, Stephen Meserve, Hunter Smith

Project Summary

The musical staircase makes use of the digital input and audio output capabilities of the NI myDAQ. By connecting each digital line to a switch, we can trigger up to 8 signals at a time. Based on the line that is triggered, we choose to play a different sound through the audio output. So, if someone steps on a switch, it triggers that line and produces the corresponding note (or user-specified sound) on the musical staircase.

Parts List

a)      NI myDAQ

b)      NI LabVIEW with DAQmx driver installed

c)       8 Wooden yard sticks

d)      8 Long paint sticks

e)      2 25 ft rolls of aluminum foil

f)       1 2 in. roll masking tape

g)      80 ft electrical wire

h)      Wood glue

i)        Speakers with mini-audio jack

Estimated cost: $25

Construction

Stair Steps

Cut or break each of the long paint sticks into 4 equal pieces. Stack two pieces on each side of the yardstick and glue together. This elevates the yard stick above the ground.

Once glue has dried, wrap yard stick with aluminum foil as smoothly as possible and tape the top completely – leaving a quarter inch of aluminum foil showing on one edge.

Repeat for all 8 stair steps.

Stair Ground

Roll aluminum foil from the top step down to the bottom step. You will want it to be placed at the center of each yard stick. Tape it flush to the stairs.

Wiring

Wire should cut to the lengths necessary to reach from the step to the NI myDAQ. Strip one end to have about 2 inch bare wire. Strip the other end to have about ¼ inch bare wire.

Form the 2 inch end into an “S” and slide it beneath the aluminum foil on the top of the step. Tape it down to secure it. Connect the other end to the corresponding digital input on the NI myDAQ (Step 0 goes to DIO 0).

Repeat for all 8 stair steps.

Tape the last wire anywhere on the sheet of aluminum foil that is flush to the steps. Wire the other end to the Digital GND input on the NI myDAQ.

Audio

Connect speakers to Audio Out port on the NI myDAQ.

Theory of Operation

The digital lines of the NI myDAQ are pulled high internally, so when they are not connected to a complete circuit they will read high, or True. When someone places their foot on the step, the yardstick bends and makes contact with the grounding sheet below. This effectively shorts the digital line to ground, causing it to read low, or False. When the software detects this change on a particular step, it sends the corresponding sound information out of the Audio Output channel, which you hear on the speakers.

To accomplish playing chords, all digital lines are read together, and if more than one line has dropped to the low state at the same time, those waveforms are added together and then sent to the audio output.

The waveforms for each note are read in from separate WAV files. These WAV files can be replaced with any chosen by the user.

Video

ATTACHED: CODE

Comments
malboro
Member
Member
on

I want to download your scale files

Contributors