Searching \ for 'Voltage & Current Measurement' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/power.htm?key=voltage
Search entire site for: 'Voltage & Current Measurement'.

Truncated match.
'Voltage & Current Measurement'
2000\01\20@222924 by

I want to be able to read a voltage from a battery and the amount of current
during charging and discharging.   This will be used to my 90 watt solar
panel.  (More panels to come later)

I have decided to use a Current Sensor from
http://www.west.net/~escor/XAE25XL60.pdf and have chosen to use the XL60
amp.

Okay now the question.

To Measure the Voltage:
I want to be able to read up to 25.6 volts using a 8 bit a/d convert (25.6
/ 256 is .1 res.)  I though about using 2 resistors to bring the voltage
down to 5 volts and then measure it.   (A voltage Divider?)

For the Current:
The voltage is 2.5 volts at 0 amp and 21 mv per amp after that.   So at one
amp the voltage output would be 2.539 volts for a current draw and 2.461
volts when charging.    I was wondering if I would have to use a 12 bit A/D
converter to detect the changes in voltage so I could get a decent reading.
I would like to be able to read about 100ma resolution or better if
possible.  Is this a good Idea or can someone due better?  Keep is simple...

I am trying to keep this a simple as possible.

Norman Tomlins

Norman Tomlins wrote:
>
> I want to be able to read a voltage from a battery and the amount of current
> during charging and discharging.   This will be used to my 90 watt solar
> panel.  (More panels to come later)
>
> I have decided to use a Current Sensor from
> http://www.west.net/~escor/XAE25XL60.pdf and have chosen to use the XL60
> amp.
>
> Okay now the question.
>
> To Measure the Voltage:
>         I want to be able to read up to 25.6 volts using a 8 bit a/d convert (25.6
> / 256 is .1 res.)  I though about using 2 resistors to bring the voltage
> down to 5 volts and then measure it.   (A voltage Divider?)

Yes. Use large value of resistance so as to not drain your
batteries. I.E. don't use 100 ohm resistors.
Something like 40K, 10K should give you the 5:1 divider you
want (for a 5V PIC). Remember to bypass your lower resistor
with a small capacitor to remove noise (.1uF is good enough).
Use a fuse in the lead coming from the battery so that you
can't arc weld if some screws up (short on PCB).

> For the Current:
>         The voltage is 2.5 volts at 0 amp and 21 mv per amp after that.   So at one

Why the DC offset in the sensor? I guess it's meant for bi-directional
sensing into a unipolar A/D.

> amp the voltage output would be 2.539 volts for a current draw and 2.461
> volts when charging.    I was wondering if I would have to use a 12 bit A/D
> converter to detect the changes in voltage so I could get a decent reading.

No, you can use an Op-Amp to remove the DC offset, or add some gain.
You really don't need to buy a commercial current sensor.
Just use an op-amp to amplify the small drop  you'd get from
measuring a small resistance in the negative leg of your
battery (called a shunt). .01 ohms * 1.8A=18Mv. Using a gain of 250 you
get a nice 5A full scale. Be sure to use the op-amp
in differential mode when you read your shunt, and use a trim pot
to offset it to whatever zero point you like.

> I would like to be able to read about 100ma resolution or better if
> possible.  Is this a good Idea or can someone due better?  Keep is simple...
>
> I am trying to keep this a simple as possible.

Home made shunt, one good op-amp, 7 resistors, 2 caps, 1 pot. Can't get
much simpler I would think.
Sorry I can't do ASCII schematic but you just need your standard
differential op-amp cct with a DC offset injection in the
negative sum junction.

> Norman Tomlins

Norman Tomlins wrote:
>
> I want to be able to read a voltage from a battery and the amount of current
> during charging and discharging.   This will be used to my 90 watt solar
> panel.  (More panels to come later)
>
> I have decided to use a Current Sensor from
> http://www.west.net/~escor/XAE25XL60.pdf and have chosen to use the XL60
> amp.
>
> Okay now the question.
>
> To Measure the Voltage:
>         I want to be able to read up to 25.6 volts using a 8 bit a/d convert (25.6
> / 256 is .1 res.)  I though about using 2 resistors to bring the voltage
> down to 5 volts and then measure it.   (A voltage Divider?)

That's ok. You can use a single 8 bits ADC with two channels, one for
voltage another for current.
Use 1% or better > 10k film resistors for the division.

>
> For the Current:
>         The voltage is 2.5 volts at 0 amp and 21 mv per amp after that.   So at one
> amp the voltage output would be 2.539 volts for a current draw and 2.461
> volts when charging.    I was wondering if I would have to use a 12 bit A/D
> converter to detect the changes in voltage so I could get a decent reading.
> I would like to be able to read about 100ma resolution or better if
> possible.  Is this a good Idea or can someone due better?  Keep is simple...

The XL60 generates 22mV (not 21mV) per Ampere sensed.  Suppose you
connect the output of the XL60 to the + input of an op-amp, while the -
lead goes to an adjustable voltage divider at 2.45V, so the op-amp will
amplify from 11 mV up to 89 mV. If this op-amp gain is 20, your output
signal will be from 220mV up to 1.78V. Feeding this signal to a 12 bits
ADC (unipolar), with a reference voltage at 2.5Vdc you will read values
from 360 up to 2916, being your zero current equal to (1V) 1638, so your
resolution will be ADC output 2916-360=2556 for the XL60 output delta of
2.539-2.461=78 / 22 = 3.545A, so 3.545 / 2566 = 0.00138 (1.38mA) per ADC
step.

A 8 bits ADC would give you a resolution of 16 x 1.38mA = 22mA, zero
current would be a count of 102. It is not enough?

Adjusting the ADC reference voltage to around 2.262V you can get a
resolution around 20mA, easy for your PIC math.

Remember that instead of everything above (for current), you can use a
shunt resistor of 0.1 Ohm connected directly to the inputs of the 8 bits
bipolar ADC, with a ref voltage of 200mV...  This shunt will steal only
(0.1 Ohms x 1.77A^2) = 313 mW from your system. So, your device will be
made with only few resistors, an ADC with two inputs, a PIC and the LCD
display.   Note: If using 200mV Vref at your ADC, you need to step down
the 25.6V to 200mV, use 1% commercial film resistors 64.9 kOhms and 511
Ohms, output is 199.99mV when input is 25.6V, @ 391.3µA.

Wagner.

If I use a homemade shunt how do I know the resistance?  My meter will only

{Quote hidden}

The easiest way is to use a milliohm meter, but not all people
have access to one of these.   The way I suggest is to determine
the amount of current you want to shunt, choose a wire that will
safely handle that current, find the resistivity of that wire
from a chart, determine from that how long the wire should be,
make it about 10% longer than calculated, connect to the circuit
and check the reading on an accurate ammeter, then trim it down
until it reads correctly.  It usually won't take long to trim
it once you're in the ballpark.  I've done this many times to
make shunts for very sensitive milliammeters I've used in my
homemade Ham gear.  Like reading up to 10 ams for instance on a
100 uA meter movement.  I used this particular meter because I
had one.  Anyway, tht's how I do it.  It's worked like a champ
for years.

Regards,

Jim

On Fri, 21 January 2000, Norman Tomlins wrote:

{Quote hidden}

jimjpes.com

a) If your meter can measures mV in AC, connect the shunt in series with
a 100W lamp and measures the Vac drop over the shunt...  In 110Vac
system, it should be 0.9A, so divide the read mV by 0.9 and you will
have some idea of your home made shunt resistor.  Be careful.  You don't
need to do any fancy wiring, just connect shunt and meter in parallel to
the lamp wall switch (switch off).

b) Another suggestion (safer): Use a car's lamp (break for example)
directly connected to the battery with the shunt in series. Example:
using a 25W lamp (25/12=2.08A), divide the (dc) voltage across the shunt
by 2.08, you will have the shunt resistance.  If you read 200mV, your
shunt value is 0.2/2.08 = 0.096 Ohms.

c) Comparison: Use the option (b) above and install together (in series)
a Known Low Value Resistor (KLVR) 1 Ohm or less, measure both Vdrop
across the resistor and your shunt, then apply the formula;
Shunt_Resistance = Vdrop_Shunt x KLVR_value / Vdrop_KLVR

All of this is rough measurements, but better than guessing.

Wagner.

Norman Tomlins wrote:
>
> If I use a homemade shunt how do I know the resistance?  My meter will only
> read down to 1 ohm.

Maybe I am missing sound thing here..

The Voltage I am to measure is upto 25.6 volts however, the VRef could only
be 5 volts or less.

{Quote hidden}

> {Original Message removed}
Another good way to measure low value resistors is to put some current
through it, then measure both the current and voltage.

I use a DC power supply (5 volts works good).  Select a resistor in the
1-10 ohm range.  Resistance is not critical, nor is knowing exactly what
the value is.  Let's say you choose a 5 ohm resistor.  Put your 5 ohm and
low value resistor in series across the power supply.  Use your DMM to
measure the actual current flowing.  In this case it will be a tiny bit
less than 1 amp.  Now mesaure the voltage across your unknown resistor.
Divide the voltage by the current, and you have your resistance!  Be
careful of current and power ratings when doing this.  It's easy to burn
up a resistor or power supply if you're not!

This works even better if you have two meters, so you can use one for
current and the other for voltage.  This is because the meter has a very
low resistance on the ammeter setting, and actually changes the current
in the circuit when you remove it so you can use it to measure voltage.

But why make so much fuss?  Digi-Key stocks resistors from 0.005 ohms and
up, as do many other vendors.  The Ohmite 10 Series resistors at Digi-key
are 1% tolerance and around US\$1.50 each.  These are multi-watt jobs, but
there are smaller ones as well as surface mount ones available.

Don

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...