reading a voltage with a SuperPRO

Post details of your projects here.
Post Reply
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

reading a voltage with a SuperPRO

Post by YahooArchive »

I could swear I saw a sample project to do this somewhere... I have a power
source that will always read between 11 - 14, or 0 volts. (It's the output of a
charge controller for a solar powered WiFi tower.) I'd like to periodically
read the output voltage, and send it to my desktop computer.

I already have the means to send small data samples from a SuperPro over the
network (via TTY session on network radio's serial port) but I'm not sure how to
read voltage. Ideally resolution would be 0.01V but 0.1V would be workable.

I see that the AD pins read voltage between 0 and 3.3V, so would I need to drop
the voltage with resistors? How do I calculate the resistance value? The
highest quality resistors are 5%, right? So I'd just have to calibrate the
values returned against a DMM?

One [more] thing that confuses me, I put a few K ohms resistor between my meter
and 12 volts and it still read 12 volts?

Any help appreciated.


-Mark McGinty



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: reading a voltage with a SuperPRO

Post by YahooArchive »

Hi Mark,

Basic Ohms Law is what you need.


> ----- Original Message -----
> From: Mark
> Sent: 12/05/12 12:20 PM
> To: ARMexpress@yahoogroups.com
> Subject: [ARMexpress] reading voltage with a SuperPro
>
> I could swear I saw a sample project to do this somewhere... I have a power
source that will always read between 11 - 14, or 0 volts. (It's the output of a
charge controller for a solar powered WiFi tower.) I'd like to periodically read
the output voltage, and send it to my desktop computer.
>
> I already have the means to send small data samples from a SuperPro over the
network (via TTY session on network radio's serial port) but I'm not sure how to
read voltage. Ideally resolution would be 0.01V but 0.1V would be workable.
>
> I see that the AD pins read voltage between 0 and 3.3V, so would I need to
drop the voltage with resistors? How do I calculate the resistance value? The
highest quality resistors are 5%, right? So I'd just have to calibrate the
values returned against a DMM?
>
Best resistors are better than 1% but 1% is more than good enough for this. Â If
you have 15 volts (for simplicity) and you only want 3 volts (again for
simplicity) then you need to divide by 5 so that you need 2 resistors one of
which is 4 time the value of the other. Â You don't say how big a current your
solar system can provide but if your resistor network only takes 1 mA it
shouldn't affect it at all and it shouldn't be affected by the input resistance
of the SuperPro. Â 15 volts at 1mA needs 15k ohms. That works out nicely as 3k
and 12K which are available in 1%.


> One [more] thing that confuses me, I put a few K ohms resistor between my
meter and 12 volts and it still read 12 volts?
>
The input resistance of your meter should be high, at least 1M ohm possibly 10M
ohm. Putting a resistor of say 5k ohm in series with it would make very little
difference, 5K/1M = 0.5% change. Â

-Will

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: reading a voltage with a SuperPRO

Post by YahooArchive »

I did not know that "pick your own value" resistors are available:
http://www.digikey.com/product-search/e ... esistors/6\
6806?k=resistors

1% resistors are very common.

Resistors in IC's can be passivated first and then "trimmed" using a laser
through the passivation.

Standard 1% values available are different than 5% and are different than 10%

Take a look here:
http://hyperphysics.phy-astr.gsu.edu/hb ... oldiv.html

A voltmeter gives you a good result because the input Resistance is much greater
than the Source resistance. A battery might have a internal resistance < 1
ohm, and a typical meter may have a resistance of 10 M ohms. 1 ohm || 10 M
ohms is extremely close to 1 ohm and thus the meter doesn't disturb the
circuit.

In electronic devices, there is a input bias current associated with the device
and it could be on the order of 1e-12 Amps or pA (picoamps). This affects a
measurement too. Input bias current has all sorts of dependencies on such
things as temperature etc.

You might be better with an expanded scale voltmeter and say a comparator.Â
e.g. 10-16 V, and when the voltage is say <9.5 volts you get a digital
indication of that.

With simple A/D converters there is something called a quantization error which
is easy to see if you hypothetically set the full scale count to 100. If the
system reads 1 +- 1 bit, then it's like a 50% reading error already. If you
read 3, it's less and if you read 50 it's even less. That's also why some
measurements take a zero of the process variable and shift it to 1V of the
measured value. e.g. 1- 5V.

When the outside world is measured all sorts of things can happen, One of the
most common is a difference in ground potentials and prtection against a
reversed battery or an alternator out of control, for instance. Automotive
transients can easily be from -200 V to + 50 Volts.

This is probably much more information than you need.

-Kiss

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: reading a voltage with a SuperPRO

Post by YahooArchive »

I agree with Will, but want to clarify how the resistor divider works. You would
connect the 12K 1% resistor to your voltage source, then connect the 3K 1%
resistor to the return (ground) of your source. Connect the remaining ends of
the two resitors together, and also connect that junction to the input of your A
to D Converter. The two resistors will make a voltage ladder between Ground (0
Volts) and the Input voltage (~15 Volts). The junction voltage can be calculated
by the formula.

Junction Voltage = 3000 x (Input Voltage/15000).

1/8 watt resistors or larger are sufficient to dissapate the power.

-danlee

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: reading a voltage with a SuperPRO

Post by YahooArchive »

Thanks Dan,

I should have made that clear.

"KeepIt SimpleStupid" I have standard value 0.1% resistors from 1950's and used
special value 0.01%? from Vishay 25 years ago.

Cheers
Will

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: reading a voltage with a SuperPRO

Post by basicchip »

A quick picture will show you what is happening with the meter.
meter.gif
meter.gif (4.66 KiB) Viewed 17816 times
The meter looks like a 10 MegOhm resistor or greater, so the resistor divider is 10000000/(10+10000000) or basically 1

When you add the 3K resistor the 10 MegOhm is in parallel, which is 2999.1 or still basically 3K

But you will get the voltage at the battery divided by (10000+3000) /3000

This will give you a range of 2.308 to 3.230V at the A/D input for 10-14V. (so you have 1/3 of the 0-4096 range of the A/D)

If that is not enough accuracy, you could add an op amp as a voltage subtractor, and subtract 9 or 10V from the reading, you would still need a voltage divider to keep the range below 3.3V

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: reading a voltage with a SuperPRO

Post by basicchip »

Thanks Dan,

I should have made that clear.

"KeepIt SimpleStupid" I have standard value 0.1% resistors from 1950's and used
special value 0.01%? from Vishay 25 years ago.

Cheers
Will

mmcginty
Posts: 4
Joined: Wed Dec 05, 2012 11:03 am

Re: reading a voltage with a SuperPRO

Post by mmcginty »

Oh man I hate this forum software, if you take too long drafting a post your login times out, it redirects you to the login page, and all your input is gone! It isn't that hard to preserve posted data across a redirect, embed the inputs from the original form as hiddens in the login form, save them in a temporary database row -- for a web site to behave this way is unconscionable...

Anyways, thanks everybody, especially Dan for connecting the dots for me. This is exactly what I needed.

Bruce, I would've posted here originally if there was a link on the home page of the yahoo group (which, as of 5 minutes ago I rather prefer.)


Thanks again,
Mark McGinty

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: reading a voltage with a SuperPRO

Post by basicchip »

mmcginty wrote:Bruce, I would've posted here originally if there was a link on the home page of the yahoo group (which, as of 5 minutes ago I rather prefer.)
OK, I'll see if I can do that

Post Reply