Introduction: Piano Staircase

Picture of Piano Staircase

As you guys know April 1st was celebrated as " ARDUINO DAY" and it was a celebrated in our college by conducting various events and workshops.It was a very special day for me....

Since i was very interested in Arduino,I was given an opportunity so that students should be attracted,involve and have fun......I really thank all the people who supported and believed in me....

Here i will be explaining about methods i have applied in making this fun filled project....

what will be discussed here...

1) Research on components (Here there will be alternatives for the components)

2) Electronics...connections...

3) Arduino code

4) Processing code

Step 1: Things Used for This Fun Project

Picture of Things Used for This Fun Project



• Arduino UNO
• Processing 3 software
• 6 X Ultrasonic sensors-----(6)
• External speakers------(desktop speakers optional)
• Jumper wires
• Breadboard------(initial testing)


Let's get started.....

Extra parts which will be using for final prototype...



• Screw terminals
• Wires really long it depends on length of the stairs

Step 2: What Is Piano Stairs?

Picture of What Is Piano Stairs?

Piano staircase is basically and interactive interface which sounds with different tones when you step on stairs one by one...

Piano staircase is basically an application that plays specific audio files when sensor is triggered.

According to my analysis, the act of stepping on steps can be transferred to micro-controller using sensors...

1) Using LDR for each staircase but the disadvantage is there will be huge amount of work to calibrate and not preferred stairs exposed to sunlight.

If you guys are interested in doing this project using LDR here is the link of Instructable

2) Using contact type on each stair like switch with completes the circuit and gives a signal to micro-controller

3) Using IR sensors(low cost) it has very short range and cannot be calibrated according to distance and it interacts differently with different colors.

So this made me ended up using 'ULTRASONIC SENSOR' which simply detects any obstacle in front of it using time required to receive the sent ultrasonic pulses...

Step 3: Implementation and Working (Using One Ultrasonic Sensor)

Picture of Implementation and Working (Using One Ultrasonic Sensor)

These piano stairs use a Ultrasonic sensor for each stair. There should be flat surface on one side of the stair, the ultrasonic sensor on the other. In this setup, the Arduino reads from the sensors and passes the values to the processing software serially which plays the sounds from the audio files attached to the processing code.

  1. Connect the sensors to Arduino as shown in above image.
  2. Make sure that if you are using digital pins ultrasonic uses trigger pin for transmitting ultrasonic waves and echo pin to receive (PWM pin of Arduino)
  3. Data received is passed through usb cable connected to Arduino uno and computer

***Since I am contesting on INVENTION please show your support by Voting***

Step 4: Arduino Code and Processing Code for One Sensor

Picture of Arduino Code and Processing Code for One Sensor

If you are new to Arduino download the Arduino compiler i.e ide from the link here---Arduino IDE

And processing ide can be downloaded from here---Processing IDE

Here is the arduino code for one sensor only for initial understanding of program

"ARDUINO CODE CAN BE DOWNLOADED FROM ZIP FILE PROVIDED BELOW"

(Make sure that header file is in same folder)

"AND PROCESSING CODE IS INCLUDED IN ZIP"

(Make sure that all the files provided here should be in one folder)

Once we have uploaded the code to Arduino UNO, we will be able to see a data in the serial monitor.(Exit from the serial monitor while using processing)

First, download Processing IDE from Processing official website.as i have given the link above and then install the contributed library “Minim” in Processing IDE.

After that, reboot your computer just to make sure the library is detected by Processing....

I have provided some of the piano notes you can change them as you like...

That's it turn up the volume.....

I choose processing because, since output of microcontroller is in digital it should be converted to analog to sound like(to power speaker) piano and we will be needing musical shield and this costs more instead we can use soundcard of computer and make it hear more natural...

***Since I am contesting on INVENTION CONTEST please show your support by Voting***

Step 5: Now Its Time for 6-sensors

Picture of Now Its Time for 6-sensors
  • If you are planning to add more sensors use analog pins for echo pins input to arduino

ARDUINO CODE FOR 6-SENSORS CAN BE DOWNLOADED FROM ZIP FOLDER BELOW

(Make sure that header file is in same folder)

PROCESSING CODE IS INCLUDED IN ZIP

(Make sure that all the files provided here should be in one folder)

Once we have uploaded the code to Arduino UNO, we will be able to see a data in the serial monitor.

it should look something like this 223,234,245,233,220,277

You can see there is lots of lag this can be reduced as i kept boxes is to reduce the range this is because it reduces the time required for reception of ultrasonic waves....

And this may look 93,97,95,94,99,93,98

The threshold for detection of obstacle or till where the sensor should detect can be changed using the line which i highlightined in processing image.

In case peeps you find an error in any sort of time just leave a comment i will definetly go through it...

Step 6: Wire Up Everything

Picture of Wire Up Everything

Firstly take the measurements of the steps.This is really important since we should not be wasting wires or run short

As shown in above image distance between the steps was 45cm and since we are placing sensors in between the stairs the length between each sensors will be 45cm(approx)

Calculations for wires:(according to image)(from the arduino uno)

45cm =1.5feet

(For 6th sensor)6 stairs X1.5 feet=9feet wires required

(5th sensor) 5th stairX 1.5feet=7.5feet

(4th sensor)4 stairX1.5 feet=6feet

(3rd sensor)3 stairX1.5 feet=4.5 feet

(2nd sensor)2 stairX1.5 feet=3 feet

(1st sensor)1 sensorX1.5 feet=1.5feet

Each sensor has trig pin and echo pin which should connected to arduino uno so all the calculation above should be multiplied by X2.

And VCC and ground is connected in parallel.

I soldered all the wires to the sensor and connected to screw terminals other side of terminal was jumpers which will be easy to connect to arduino uno.(Image is provided)

Setup sensors on the one side of wall (i used double sided tape) and tape up the running wires,and like i have said to prevent lagging i used boxes.

Make your own piano stairs for college fests, or as fun project at your home...

ALL THE BEST

***Since I am contesting on INVENTION CONTEST please show your support by Voting***

***Also share it with your friends***

See you at my next instructable !
Thank you

Adithya Pai P

Comments

samee14326 (author)2017-06-27

hi your project is very good . i am working on automatic stair case lights. (using 2 pir sensors one is up and one is down + arduino uno + relays to on lights). but facing problem is that one pir sensor detects and send signal to arduino to run relays in sequence and when a person travels from down stairs to up stairs the up pir sensor also detecting and reserving the process and after the down pir process completes then it starts the process automatically .. so how to hold a pir sensor not to detect if any one detected in both and in process ...

adithyapaip (author)samee143262017-06-27

Pir sensors works as trans receivers so.. I will tell you what I have understood from your query... Staircase lighting circuit is required which automatically turns off while person reaches top of the stair but your question is what if person from top of the stair walks down at the same time.....
Solution: Install another pir between the staircase (halfway) and control all the pirs relays using one arduino program it by checking && logic and || logic with pir installed in halfway....with top pir or down pir....sequential if loop....
If you have any doubts you can ask again....
All the best...

SoorajS18 (author)2017-04-27

What is the cost of ultrasonic sensor and how much did it cost you to make it....

adithyapaip (author)SoorajS182017-04-27

Each ultrasonic costed me around 50 Rupees i.e 0.78$, And total with arduino ended up within -(600Rupees) 10$

VinayakK26 (author)2017-04-25

Good.... idea...

i wanna try that...

shaileshprabhu64 (author)2017-04-25

I would like to build this one for my college fest.....

aravind999 (author)2017-04-11

Very innovative buddy!!
Good going !

Nishanth kumar (author)2017-04-09

Nice project.. very innovative. Good work

AkshayB74 (author)2017-04-08

Nice project this brings people to collaborate in college fests. This also gives all tge junior in there college to know about the Arduino and to make them use this to make a good projects which will help the society.

adithyapaip (author)AkshayB742017-04-09

thank you

Vikramsanil11 (author)2017-04-08

Just check this, u ll find the awesomeness of music

Nagabhushan Kamath (author)2017-04-08

Awesome explained..!! indeed a nice one

Ashgshsjhajsj (author)2017-04-08

Wonderful project for aurdino lovers!

Hrishik9 (author)2017-04-08

Great innovation!

Arun Bhandarkar (author)2017-04-08

Innovative project which combines art and technology
Good luck

GauravPK (author)2017-04-08

That is amazing!!

NandeeshK1 (author)2017-04-08

Cool ?

Nithinrajshetty (author)2017-04-08

It is very much innovative and procedures of making step by step explained

Lionel1707 (author)2017-04-08

Great project

AshwinP24 (author)2017-04-07

Awesome instructables!! Nice and clean explanation

adithyapaip (author)AshwinP242017-04-07

Thanks a lot...

About This Instructable

3,116views

52favorites

License:

Bio: I love to learn,build and design.....
More by adithyapaip:Refrigerator Door AlarmPiano Staircase Joystick Led Pwm
Add instructable to: