03/2013 - 10/2013
The name of this project is a combination of three words: breadboard, Arduino, and piano. Having played piano since the age of five, it's only natural for me to make an electronic piano after discovering the wonderful Arduino prototyping platform. I started working on this project soon after receiving the Arduino Starter Kit, and had since made several iterations, each with a few new features and improvements over the previous one. During the course of this project, I learned how to read multiple digital inputs using a single analog pin, what a shift register is and how to use it, how to build my own Arduino on a breadboard, how to build an audio amplifier circuit, and last but not least, how to solder.
In the video, I play some classic Pokémon Red/Blue music on the Boarduiano v6. Below are pictures showing the seven iterations of this project. The source code for this project is available here.
I made this simple Arduino Piano based on a project in the Arduino Starter Kit. The button inputs are read using a voltage divider circuit. When a button press is detected, the Arduino generates a square wave with the corresponding note frequency to drive the piezo speaker.
I extended the range of the keyboard to three octaves so that more songs can be played. The octave is changed by turning the potentiometer, and is indicated by the three blue LEDs.
I added more buttons to complete the chromatic scale so that even more songs can be played. I added the functionality to send MIDI messages over USB, thus allowing the use of the keyboard with all the different instruments in GarageBand or similar software.
I made a rough prototype using cardboard so that I can carry it around without worrying about components getting disconnected. I added more buttons so that there is no need to frequently switch between octaves by turning the potentiometer.
I built my own Arduino on the breadboard, and replaced the resistor ladder with 74HC165 shift registers for reading button inputs so that multiple notes can be played simultaneously (MIDI only). I also replaced the piezo speaker with a 0.25W speaker for better and louder audio output.
I replaced the 0.25W speaker with a 3W speaker, along with a LM386 audio amplifier, for even louder sound. I added a second potentiometer for adjusting the speaker volume, and a FTDI breakout board so that the ATmega328P microcontroller can be easily programed.
I cleaned up the wiring, and added button caps so that the keyboard looks more like a piano. I replaced the LM386 audio amplifier with a more efficient class-D amplifier breakout board from Adafruit.