Build the Arduino Pocket Piano

App Main1

Ever wondered how the Arduino would fair as a keyboard synthesizer? Wonder no more - the Pocket Piano kit from Critter and Guitari proves Arduino can sine and saw quite well. Features include -

  • 25 keys and multiplexer circuitry
  • 4 potentiometers, 1 controls output level
  • Microchip MCP4921 12 bit SPI DAC
  • Passive low pass output filter
The kit comes with all the support hardware needed to turn the versatile micro into a sweet digital sound synth ready for experimentation. Sporting 2 octaves worth of key/switches and 4 full-size pots, it's a relatively long board (over 3 Diecimilas long) - but the assembly is still quite simple.

Read on for construction pictorial and info.







Parts list
app_partslabelled_edit2.jpg

  • A - PCB
  • B - Male header pins, strip of 28
  • C - Resistors 10KΩ x6 (brown, black, orange) 220Ω x1 (red, red, brown) 4.7KΩ x1 (yellow, violet, red)
  • D - Capacitors 1µF (105) x1 ("105") .1µF (104) x4 ("104") .01µF (103) x1 ("103")
  • E - Potentiometers 10KΩ x4
  • F - RCA jack
  • G - LED 5mm red
  • H - ICs 74HC4051 multiplexer x3 MCP4921 12-bit DAC x1
  • I - -Tactile switches x26



1 - Snap in the switches app_tactswitches_2-upplace.jpg We'll start with the tactile switches because their satisfyingly fun to pop into place. Turn the board over with the small numbered labels facing down. While supporting the pcb from below snap each of the 26 tactile switches in place - insert one side's legs, then firmly press in the other side.
App Tactswitches Solder Flip the board over and solder the legs of each switch. 26 switches x 4 legs a piece = this will take a little while.



2 - Resistors
App Resistor Bend
The resistors will be mounted standing vertically, we need to pre-bend them in the above manner so they'll slip into pcb nicely.

App Resistor Mount
Place each resistor into it's appropriate location - standing on the silkscreened side of the board. You'll notice one pad is labeled "330", this is a misprint - so use the 220Ω there instead.

  • 10KΩ x6 (brown, black, orange)
  • 220Ω x1 (red, red, brown)
  • 4.7KΩ x1 (yellow, violet, red)

Bend each resistor's lead flat to the board to keep them upright and then solder each to its respective pad.

Once they're securely soldered clip each excess lead with a pair of nippy clippers or similar tool.







3 - Capacitors
app_caps_104_mountalt.jpg
Place each capacitor in its appropriate spot on the board. Be sure to read their labels carefully as they're quite small and easily confused

  • 1µF (105) x1 ("105")
  • .1µF (104) x4 ("104")
  • .01µF (103) x1 ("103")

app_caps_104_solderclip.jpg
Bend the leads, solder, and clip - just as with the resistors.








4 - IC chips
App Chips Straighten
The IC's need a little preparation before settling into their new homes. You'll notice each chip's pins splay out a bit - carefully press each side against a flat object until they stand perpendicular to the IC's body, pretty much any sturdy plastic surface will work.

App Chips Notch
Orient the chips on the board so that their notches match the silkscreened labels, and settle them into the solder padded holes.

App Chips Bend
It's helpful to bend some of the protruding leads, in order to secure the chips while soldering.

App Chips Solder
Solder the IC's into place, while taking care not to overheat the chip's body while soldering.








5 - Pin headers
App Pins Clip
Now we need to divide up that 28-pin header into 4 pieces - 2 8-pin strips, and 2 6-pin. Count the necessary sections and separate them with your clippers - keep each side somewhat secured by hand - they tend to fly off during clipping.

App Pins Mounted
Set each row of pins in place on the labelled side of the board, with the longer ends facing upward. While keeping them perpendicular to the board, use a piece of tape to temporarily secure each strip in place.

App Pins Soldered
Turn the board over and solder each pin cleanly to its pad, ensuring none of the solder bridges between the contacts.








6 - LED
App Led Place
the LED needs to sit lens-up on the labelled board side. Add the LED to it's spot in middle of the wider end of the pcb paying close attention to its orientation. The longer should be closer to the corner of the pcb with 3 large mounting holes (that's where the RCA jack will go)
Bend the leads, solder, and clip.








7 - RCA jack
App Jack Placeandsolder
snap the RCA jack into place on the labelled side of the board. Solder somewhat liberally to provide a durable audio connection








8 - Potentiometers
App Pot Placeandsolder
Now we get to the big parts - the potentiometers go into shaft facing up on the along the edge of the non-labelled side of the board. Use plenty of solder to keep their relatively large weight secure during use. Once soldered, clip each lead carefully to avoid airborne clippings!




app_main2.jpg

And then - oh wait, that's all for soldering. Time to introduce Pocket Piano to its Arduino core -








9 - Connect Arduino, upload software
App Arduino Attach
Line up the appropriate length pin strips to the Arduino's female headers. The boards should only properly fit together one way - the right way, with Arduino's USB and DC jack jutting out from below the Piano board's wider end. Slowly and firmly press the two board's together till they fit flush with one another.

App Arduino Upload
Now plug the Arduino into your computer's USB port and get to the uploading! Pocket Piano sketches are available for download from Critter and Guitari's site.

Once you've loaded up one of the programs, and connected the RCA jack to a stereo/amplifier - MAKE SOME MUSIC!


Recent Entries

Comments

Oldest comments listed first.

Posted by: Milky on May 16, 2008 at 8:47 AM

thanks!

can't wait to build this kit! was so focused on the finger piano/diecimilia at maker faire that i spaced picking up a basic arduino kit before they were all gone for the day. oof!

also wanted to thank you for leading the arduino discussion on saturday at maker faire sf. though i was sad to miss sunday's arduino/music discussion (more my bag...note to self: one day at maker faire is NOT enough), i walked away from saturday with more of a can-do attitude than i previously had with it. it's all so exciting, especially with shields like this one. great stuff!


Posted by: Collin Cunningham on May 16, 2008 at 11:32 AM

thanks back atcha

Great to hear that helped! The endless streams of new lingo and hardware can be a real turn-off when your digging in - no one can ever know all of it. Working with parts or code I know little about seems the most reliable way to learn, imo.

fyi - I'll be writing posts here about arduino sound/music soon, including the basics from the maker faire talk.


Posted by: Jay Vaughan on July 23, 2008 at 4:26 AM

We made two of these last night ..

.. here in Vienna, at MetaLab. We made two so we could have a proper jam session, and they work very well - very impressed!

So up next from us at MetaLab, some new synth models to upload to your PP's, including a drum machine! :)


Posted by: Collin Cunningham on July 23, 2008 at 10:48 AM

@Jay - drum machine sounds great! Look forward to the new models


Posted by: jbrandt on October 5, 2008 at 4:07 PM

code?


Where might one find the synth models and code for the pocket piano?

I've been messing with the FM demo-- I've added more wavetables and now I need more knobs for switching between them and other stuff...


Posted by: Collin Cunningham on October 5, 2008 at 4:41 PM

http://www.critterandguitari.com/home/store/arduino-piano.php

please share those new sounds with the rest of us!


Posted by: Greg on December 9, 2008 at 10:42 PM

NG vs. Duemilanove compatibility?

So, somewhere in the docs on this shield, it should probably indicate that it is not compatible with the older NGs and other boards, but only with the more recent Duemilanoves and such. My older NG only has four pins on the power run: 9v, Gnd twice, and 5v. It doesn't have the RESET or 3v3 pin outs that this shield seems to need; the two final pins closest to the RCA jack don't plug into anything on my old NG.


Posted by: Collin Cunningham on December 10, 2008 at 3:32 AM

@Greg - pretty sure I ran the pocket piano on a late model NG. If my memory serves correctly, all was functional except the reset button didn't work. So the 3.3V & RST pins aren't really necessary connections


Leave a comment


Subscribe to MAKE!Subscribe to MAKE Magazine!

Subscribe today, save 42% and get web access to MAKE free. MAKE Digital Edition is available only to subscribers.

$34.95 / 1 year
(4 Quarterly Issues)

Subscribe now


Void your warranty, violate a user agreement, fry a circuit, blow a fuse, poke an eye out. Make: The risk-takers, the doers, the makers of things... Welcome to Make: Online!


CRAFT Maker Shed Maker Faire MAKE television




Check out more videos from MAKE.

Maker SHED

Connect with MAKE

Be a MAKE fan on Facebook MAKE on Facebook
Visit our Facebook page and become a fan of MAKE!
MAKE on Twitter MAKE on Twitter
Follow our MAKE tweets!
MAKE Flickr Pool MAKE on Flickr
Join our MAKE Flickr Pool!
    make_tips on Twitter



    MAKE Archives

    Make: Money

    Make: Science Room
    Subscribe to MAKE Magazine!

    Make: Online editors and authors!

    Gareth BranwynGareth Branwyn
    Editor-in-Chief


    Phillip TorronePhillip Torrone
    Senior Editor
    | Web | Twitter


    Becky SternBecky Stern
    Associate Editor
    | AIM | Twitter


    Marc de VinckMarc de Vinck
    Contributing Writer
    | AIM | Twitter


    John ParkJohn Park
    Contributing Writer
    | Twitter


    Sean RaganSean Ragan
    Contributing Writer
    | Twitter


    Matt MetsMatt Mets
    Contributing Writer
    | AIM | Twitter


    Dale DoughertyDale Dougherty
    Editor & Publisher
    | Twitter


    Shawn ConnallyShawn Connally
    Managing Editor
    | Twitter


    Goli MohammadiGoli Mohammadi
    Associate Managing Editor

    Kip KayKip Kay
    Weekend Projects
    | AIM | Twitter


    Collin CunninghamCollin Cunningham
    Contributing Writer
    | AIM | Twitter

    Adam FlahertyAdam Flaherty
    Contributing Writer
    | AIM | Twitter


    John BaichtalJohn Baichtal
    Contributing Writer
    | AIM | Twitter



    More contributors: Mark Frauenfelder (Editor-in-Chief, MAKE magazine), Kipp Bradford (Technical Consultant/Writer), Chris Connors (Education), Diana Eng (Guest Author), Peter Horvath (Intern), Brian Jepson (O'Reilly Media), Robert Bruce Thompson (Science Room)

    Suggest a Site!

    Advertise here with FM.

    Why advertise on MAKE?
    Read what folks are saying about us!

    Click here to advertise on MAKE!



    Current Podcast

    itunesdl.gif Behind the Scenes at MAKE and CRAFT In January, many of the remote MAKE/CRAFT team members (myself included) convened at the Maker Media headquarters at O'Reilly Media in Sebastopol, California. Take a look behind the scenes of your favorite DIY publications as Goli Mohammadi gives us... More...

    Get the Make: Online sent via email
    Enter your email to receive Make: Online each day:



    Sign up for the Make: Newsletter

    Our Make: Newsletter covers news from maker Media, has original columns, Shed deals, and more! You can also read the archives of past issues.


     



    MAKE Fascination video series brought to you by Dow

    Make: Education
    MAKE: en Español MAKE: Japan
    Important please read


    Subscribe to MAKE Magazine!

    Recent Posts from the Craft: Blog