The Magic Piano Ft: Johann Sebastian Bach

by 729917 in Circuits > Arduino

427 Views, 2 Favorites, 0 Comments

The Magic Piano Ft: Johann Sebastian Bach

F8NUM34LDA92KWP.jpg

This is my Arduino Piano with Toccata and Fugue in D-Minor in it already that auto-plays via an ultrasonic sensor.

Supplies

What you will need:

9 Pushbuttons ( Click the Word to be directed where to find the component)

2 Piezo

2 2222 Ohm Resistors

5 10k Ohm Resistors

1 1k Ohm Resistor

1 555 Timer

1 Arduino Uno R3

1 100,000 pF Capacitor

1 Ultrasonic Distance Sensor

Research

Before anything started I needed to research and find out how am I going to do this. Considering I have done a project similar to this I thought to refine it rather than starting fresh. This is because both my design and function were good. In order to make it better, I am introducing a known new component to the design and led as well as an Arduino Uno. But my plan is to code each button to play a different note or song. Apart from that, a noticeable pattern between these designs is their use of 555 timers which is a component I am familiar with that is used in a variety of timer, delay, and oscillator applications. My research may not belong but this is due to the fact that these designs bring very few new components to the table but that is why it’s my plan to over-engineer my custom but similar design. The use of an Arduino gives me unlimited possibilities as it gives me the ability to code whatever I see fit. As well as learning new ways to code such as coding in binary code aka the zero and one’s code. 01010100 01101000 01101001 01110011 00100000 01101001 01110011 00100000 01101101 01111001 00100000 01110000 01101100 01100001 01101110 00001010 ( This is my plan for success).

The Assembly

IMG_1280.jpg
Screenshot 2022-01-24 093718.png

What your going to want to do first is to get a big breadboard and add pushbuttons as shown in the image then connect resistors above from one pushbutton to the other. Then get wires and start connecting them from one end of the pushbutton to the other (refer to image). Then add your resistor connecting to the orange wire at the end. Now that you have reached the final stages add your 555 timer and add a wire from the threshold pin to the piezo. Beside the piezo add a capacitor and ensure the piezo has a negative connection. In the final part add the second piezo to the other side and connect the positive end going into the pushbutton to pin 9 to ensure that the piezo has a negative connection as well. And there you go that's your assembly done.

Downloads

The Code

Screenshot 2023-01-24 231417.png

From here you will add the code:

https://drive.google.com/file/d/1vBespwHfv9Nms4GZF...

Then insert it in Arduino IDE or if not in TInkerCad and boom just like that you now have a fully working piano that also plays a pre-loaded song. Feel free to share and use this design as much as you want.

Downloads

Conclusion

IMG_1284.png

This has been of my first Tinker Cad creations I hope you like it and I hope to find new inspirations in the future and to hopefully make even more complex designs and codes. It was a rough and long journey before I reached here and my hope is that you all learned something new today whether it be how to code in binary or even just wanting to see how circuits work. This is my opinion was a fun tedious project and I would recommend rather than binge-watching a Netflix show learn how to code maybe even you can make something like this. It's very rewarding once you reach the end. Thank you and that has been my Piano circuit be sure to visit my website Working Piano LTD.