mitchjs wrote:. . . would I calculate the voltage divider as 6.8v input?
As you wish to measure up to 18V, you don't want the zener to be conducting when you have 18V input. A datasheet I'm looking at for a particular 6.8V zener gives a tolerance of 6.4V to 7.2V at 5mA. A graph on the datasheet clearly shows the 'knee' but there is no detailed information about the knee. I think you would need to assume that the zener may start conducting at roughly 5.4V, especially as we are proposing to used quite high value resistors so need to consider small currents. I therefore suggest resistors should be chosen such that when the input is 18V, the voltage across the zener is about 5.4V and the ADC input is 1.0V (max). You would then need to check how well the circuit performs in practice, especially with regard to linearity.
The reason I've said the ADC input should be 1.0V (max) is because it is stated that the ADC reference voltage "can range from 1000mV to 1200mV" (just above the second graph
here). I understand that means with ADC attenuation set to 0dB, it's just possible that maximum digital value could be reached with 1.0V input.
We can get some appreciation of the protection afforded by the zener (ignoring any capacitor). My datasheet shows the dynamic resistance is maximum 8Ω at 5mA. So if we consider a zener at the top end of the voltage tolerance range (7.2V at 5mA) and increase its current to (say) 100mA, we would expect the voltage to increase by only 0.76V (strictly, the dynamic resistance may not be constant above 5mA). The resistors dropping the voltage from about 5.4V to 1.0V will also drop the voltage from about -0.7V to -0.13V if a negative spike occurs.
Your proposed diode clamp looks OK but I have a few comments. With regard to the ADC reference voltage range mentioned above, in order to be sure to be able to measure up to 18V, you may wish to increase R11 to 180kΩ (or decrease R13). I am a little concerned that the leakage current of those Schottky diodes can be up to 10µA at 5V. In comparison, the zener diode datasheet I've been looking at shows leakage current up to 0.1µA at 3V. I therefore again suggest you check how well the circuit performs in practice, especially with regard to linearity. What's the purpose of R12?
I assume you are going to calibrate against a digital voltmeter, editing a numeric value in your code accordingly.
Protecting your voltage regulator may be more problematic.
Is this a one-off or will it go into production?
mitchjs wrote:... what do you think is a good read count, 10? 25? 100? to get the average
I suggest you experiment!