With the diode, the purpose it to prevent a negative current correct? How will this act to protect the pin in the case of a strong knock?
A zener will protect against both positive and negative voltages.
A regular diode only allows current to go in one direction, positive to negative. A zener
diode behaves the same way, but also allows current to flow in the opposite direction when the voltage approaches its rated breakdown voltage. In the first diagram on DVDDoug's linked page that means that any positive
voltage approaching 5V will start to conduct through the zener diode to GND. I use the word "approaches" because the breakdown voltage is not exactly
the breakdown voltage, but rather it starts to conduct a little bit when you start getting close and then fully opens up as the voltage gets higher.
Not explicitly explained on that page is that the zener is a 5V zener. Zeners come in a wide array of breakdown voltages
In the event of a negative voltage on the "in", the zener, behaving as a typical diode, will conduct from GND which has a relatively higher potential to the input. So for example, if the input is -10V and GND is 0V, you could look at it from the perspective of the input as 0V and GND as +10V. The diode conducts from the higher voltage to the lower voltage and zeroes out the input, protecting your analog pin.
So that protects you from a high voltage
knock. If it's a high voltage and high current, well, everything blows up -- it's not a lightning rod
. Fortunately the piezo doesn't generate much current so that's not a concern.