Potentiometer as voltage divider

@s_premkumar999 I think you have one connection too many :slight_smile: The link from top of RV1 to wiper of RV1 will cause problems.

Also, there needs to be a certain amount of current through a zener for it to achieve its stated voltage regulating value. I have seen values of 5mA for this.

With a minimum input voltage of 9V, and a 5V zener, the voltage across R1 will be 4V. Current drawn by 20k potentiometer will be 0.25mA (so ignore) and current into Arduino analog input will be negligible (so also ignore).

So to get 5mA through R1, its value should be 800R. In practice, a 680R resistor would be OK and easier to find.

Also note that a 10k potentiometer will be easier to find than a 20k one.