This page posted by Drew Wagner
One way in which most digital pianos are thoroughly deficient compared to their analog counterparts is in the quality of the pedals provided. For example, for the P85, Yamaha sells a nice quality single pedal, and an extremely cheap triple pedal thing that is part of their (non-portable) stand. They don't provide separate jacks for una corda and sostenuto, and the pin layout for their triple pedal is proprietary. Since most digital piano keyboards can be controlled from MIDI in, including pedal controls, it seemed reasonable to build an external triple pedal box that spits out MIDI messages, and would thus be compatible with every major digital piano.
CME makes such a pedal box, the GPP3, and the price and specs look great, but it has gotten hammered in user reviews:
http://reviews.harmony-central.com/reviews/Keyboard+And+MIDI/product/CME/GPP3/10/1
Since there are several other Arduino similar to this, I figured it would be well suited to the task and build up a little MIDI pedal box. Unfortunately, my Yamaha P85 seems to only apply the pedal control information from the MIDI input to notes that were also sent over the MIDI input. In hindsight, this probably makes sense for other uses, but it means that at least for my piano, this cute little pedal box is useless for its intended purpose. Your mileage may vary, and don't assume that because your keyboard's data sheet lists a MIDI feature, that it will be implemented in the way you are expecting. Here's the final box, although I never even bothered to screw it shut:
For more pictures and the schematic, go to MIDI Pedal Box Part 2
For a much simpler method that actually ended up working, go to Yamaha Triple Pedal Connector.