Test rig for Yamaha P45 piano sustain pedal input

The pedal input stage circuit from the service manual

A ¼″ tip, ring, and sleeve connector is the piano's input socket.  Tip goes to a positive supply voltage through a 470 Ω resistor, the ring is the input pole going directly to a processor IC, and the sleeve goes to ground through a 1 ㏀ resistor.  The capacitors are very small value caps (around 100 nF) to reduce any input noise.  The diodes are protection for the input circuit from voltages above or below the supply rails.

When a basic two-pole tip and sleeve connector is used, the ring and sleeve are joined together, and the input is pulled up to the tip voltage when the switch is closed.  Depending on the foot switch, this could be when it's pressed, or when it's released.  The supplied one opens when pressed.  If yours works in the opposite direction, keep your foot on the pedal when you switch the piano on, and the piano will work the other way around.

Basic foot pedal circuit

A fancier foot switch with a TRS connector would have the switch toggling between connecting the ring to either the tip or sleeve.  An even fancier pedal would have a variable resistor instead of a switch.

Basic foot pedal circuit

Because the piano has a hair trigger between no sustain and sustained, you need some way to make the full range of the potentiometer's travel have only a small affect on the control voltage.  Hence why it has resistors either side of it.  From what I've gleaned from other sources, the whole tip to sleeve resistance should be somewhere around 10 to 50 ㏀.

My test rig was much more basic, so I didn't have to fit a variable resistor into a tiny space inside a foot pedal and create a mechanical linkage, I fitted one across the output of a break-before-make switch.  When the switch is pressed or released its contact connects to either the tip or the sleave.  Part way through its travel its contact doesn't touch either pole, and the resistors wired across it will provide a half-pedal control voltage.

Basic foot pedal circuit

It proved the concept of half-pedaling on the foot switch, and that the piano did actually respond.  But was very difficult to find the position it worked at.  To be workable, I think a second, stiffer, shorter, spring would need to be installed in the pedal, one that comes into play around the mid-point.