The allowed power dissipation for the same diode 1N751A from the datasheet is,
Now, the Analog input is considered to as high as 12V but the actual allowed voltage is only 5V as per ADC input specifications we have considered. When the analog input exceeds 5V, the Zener diode regulates to 5V. During this scenario, the entire load current flows through Zener diode. The important design consideration here is that for a maximum input voltage (12V) the current through Zener should not exceed 500mW.
Below is the simple design to control the voltage:
In the above design, for a Maximum voltage of 12V at input and expecting D to clamp at 5.1V,
Icurrent (through diode) = 12-5.1/170 = 40.58mA
As the Zener is breakdown, all the current shall flow through the D, so, the power dissipation in the diode = 5.1*40.58m = 206.9mW
206.9mW is lesser than the allowed Power dissipation of 250mW.
To summarize,
- Select a Zener diode with the required clamping voltage
- Resistor acts as current limiter during the Zener breakdown. Resistor selected doesn't allow more current during breakdown of the Zener such that power dissipation across diode is within it's limits
- The disadvantage of using resistor is that there is a power loss


