Somewhere, I got the idea that the Zener could accept only up to about 15V, and someone pointed out that the voltage surge from the pump when it starts and/or stops could be up to 20V. So I put the voltage divider in there to bring that 20V spike down to under 15V. It's quite possible that I'm wrong about the 15V limit on the Zener.When using zeners, you don't need to have a resistive voltage divider with two resistors and then the zener. All you need to do is to provide one resistor that will allow the zener's rated current thru the zener, then connect the I/O pin to the junction between the zener and the resistor.
For example: if the max voltage is 12v, the zener is 3v3 and the zener's current is 5 mA, they you need (12v-3v3)/5mA = 1740 ohm




