Pushbutton Piano using an Arduino Redboard Designed by Jillian Holbert Parts from Jameco & Sparkfun
Description 13 key pushbutton piano plays C4 - C5 6 switches allow transposing from C2 - C7 6 LEDs indicate which switches are on Transposition goes up one ½ step using binary to count Blue LED is MSB, Red LED is LSB Arduino Redboard microcontroller programs notes to play Interfaces with speaker and switches LEDs are mechanical
Parts List 13 pushbuttons 6 switches 6 LEDs 19 330-ohm resistors Arduino RedBoard microcontroller Speaker Headers/jumper pins/jumper wire
Transposition In music, transposing a note one ½ step up means going from C4 to C#4 (C sharp) Transposing a hole step is going from C4 to D4 Transposing an octave is going from C4 to C5
Truth Table / Binary Count for Notes In HEX: C2 starts at 01 C3 starts 0D C4 starts 19 & 00 C5 starts 25 C6 starts 31
Truth Table Cont...
The Code If switch = 00 If switch = 01 then Then button 1 = C4 Button 3 = D4 Button 4 = D#4 Etc… If switch = 01 then Then button 1 = C2 Button 2 = C#2 Button 3 = D2 https://script.google.com/macros/d/Mq4KoQs2eQj- BXjejbL_IM6s6S2k1A6oy/edit?uiv=2&mid=ACjPJvG2u2xhLxHT8sPvbMhZp9mcI02jM15 XYG3Bi1NS9zjsdvvl1_PR34u5D1oR8EJa9oHZRZdupAxQWI8goAqiIY4wwzV4g1Xhd3iJll 71Fuhh2eD8mgn99G2cqr0XxR4YaOFawVHbtg
Schematic
Switch The pushbuttons are active low so the pins are attached at the voltage leg. The switches are active high so the pins are attached at the ground leg.
Two Button Piano Getting the Switches to Work
Crazy Wiring
Finished Project
Lessons Learned Soldering Prototyping Designing Tin individual components before soldering together Play with the big blobs, they will move in your favor eventually Prototyping Designing Working with an Arduino Plans go awry Take things one step at a time Programming is hard, very hard