# How do I measure voltage?

I am building a power supply using an LM317. I have decided to use a potentiometer to control the voltage. I want to include a 4 digit display to display the output voltage. Any idea on how I can measure the voltage coming out of the LM317? Keep in mind it will be more that 5 volts, so the analogRead function in an Arduino won't do the job.

Search the forum (or wikipedia) for voltage divider - then you can see how to use analogread to measure it.

wildbill:
Search the forum (or wikipedia) for voltage divider - then you can see how to use analogread to measure it.

Did you not read what I wrote? I said I can't use analogRead.

blake305:
I am building a power supply using an LM317. I have decided to use a potentiometer to control the voltage. I want to include a 4 digit display to display the output voltage. Any idea on how I can measure the voltage coming out of the LM317? Keep in mind it will be more that 5 volts, so the analogRead function in an Arduino won't do the job.

If you were willing to settle for only 3 digits, and the LM317 will be producing less than 99v, this unit from yourduino might be useful. However, I suspect you want more accuracy, and want to do it from electronics. But if you wanted to save time: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=247 (they also have green and blue lcds at a slightly higher price).

While I am at the beginning of learning about electronics, I'm not sure why you can't use a voltage divider, since it can reduce the voltage to within 5v that the Arduino can read (and then in the Arduino you multiply to get the actual voltage). I can imagine you would need a ladder or some such if you need to deal with a wide range of voltages.

Keep in mind it will be more that 5 volts, so the analogRead function in an Arduino won't do the job.

A voltage divider with suitably proportioned resistors will allow you to reduce the measured voltage into the 0-5v range to be usable by the ADC. Was there some other reason why analogread won't work for you?

Did you not read what I wrote? I said I can’t use analogRead.

No, you wrote

Keep in mind it will be more that 5 volts, so the analogRead function in an Arduino won’t do the job

(it’s up there, at the top of the page)
Of course, if you reduce the voltage to less than 5volts, there’s no reason whatsoever not to use analogRead, unless you’ve run out of pins, but that’s not what you said.