Go Down

### Topic: How do I measure voltage? (Read 1 time)previous topic - next topic

#### blake305

##### Jul 18, 2012, 07:50 am
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.

#### wildbill

#1
##### Jul 18, 2012, 01:07 pm
Search the forum (or wikipedia) for voltage divider - then you can see how to use analogread to measure it.

#### blake305

#2
##### Jul 18, 2012, 09:55 pm

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.

#### MichaelMeissner

#3
##### Jul 18, 2012, 10:02 pmLast Edit: Jul 18, 2012, 10:09 pm by MichaelMeissner Reason: 1

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.

#### wildbill

#4
##### Jul 18, 2012, 10:07 pm
Quote
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?

#### AWOL

#5
##### Jul 18, 2012, 10:10 pm
Quote
Did you not read what I wrote?  I said I can't use analogRead.

No, you wrote
Quote
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.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

#### Grumpy_Mike

#6
##### Jul 18, 2012, 11:36 pm

Go Up

Please enter a valid email to subscribe