Potentiometer as voltage divider

Hello.How could i reduce Voltaje in(9v battery or 12V-External power supply-) with a potentiometer and a 10k 1/4 resistance to V out a range 0-5V into A0(Pin) or Digital Pin?.And ,¿how to do the connections?.

Thank you very much.

I would use a linear regulator to drop that voltage down to 5V to prevent any damage to the arduino and then have the potentiometer to give your 0-5V range

What are you trying to measure or achieve?

Hi,
From the question i think that you want to give some voltage randomly to the ADC from a 9V-12V supply, so you want to reduce it in the range of 0-5V, so you can use the following circuit, the diode is a 5.1V zener to protect your arduino from over voltage.

1111.PNG

@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.

ya, I'm sorry it was a mistake, when i drawn the circuit speedy it happened so. Thanks for the correction.

Hi.Thanks for all your answers.I am trying to connect a photoelectric sensor Page Not Found | Pepperl+Fuchs to Arduino uno r3 to get an objects counter.So when Arduino reads a High pulse then up counter ,but the voltage output from the sensor is 12V and the A0 of Arduino equal or less than 5V.

mrjonny2:
I would use a linear regulator to drop that voltage down to 5V to prevent any damage to the arduino and then have the potentiometer to give your 0-5V range

Glad you are not on my project. Only a beginner would ever consider doing this. It is just so wrong.

Sounds like a simple potential divider would do the job.

Grumpy_Mike:

mrjonny2:
I would use a linear regulator to drop that voltage down to 5V to prevent any damage to the arduino and then have the potentiometer to give your 0-5V range

Glad you are not on my project. Only a beginner would ever consider doing this. It is just so wrong.

Yep. If you want a 5V supply you wouldn't start with a 12V battery, you'd use the Arduino 5V pin(!)

OP: You don't need a potentiometer. A 1.5k and 1k resistor will do the trick.

Grumpy_Mike:

mrjonny2:
I would use a linear regulator to drop that voltage down to 5V to prevent any damage to the arduino and then have the potentiometer to give your 0-5V range

Glad you are not on my project. Only a beginner would ever consider doing this. It is just so wrong.

Sounds like a simple potential divider would do the job.