Searching \ for '[EE]: Current sensing' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/power.htm?key=current
Search entire site for: 'Current sensing'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: Current sensing'
2004\06\20@041102 by Philip Pemberton

face picon face
Hi,
 I'm trying to design a simple battery meter/ammeter "thing" with a
PIC12F675. Problem is, I'm not much of an analog designer, and the analog bit
is proving to be a little troublesome.
 I've got a resistor that's been chosen to drop 10mV per milliamp of current
through the resistor. One side of the resistor goes to the battery's -ve
terminal, the other goes to ground. Now, when the battery gets discharged,
I'll get a positive voltage across that resistor. Fair enough. The problem
arises when the battery gets charged - I get a negative voltage across said
resistor, relative GND.
 How can I convert the +/- 1V (the voltage regulator is rated to 90mA,
the battery charges at 900mA) into 0V-2V with "0V" at around +1V? Polarity
isn't important - I can correct minor glitches in software.

Thanks.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
spam_OUTphilpemTakeThisOuTspamdsl.pipex.com              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.dsl.pipex.com/  | 48xCD, ARCINv6c IDE, SCSI
... Noah!  Come quick!  There's water in the basement!

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@044047 by cdb

flavicon
face
Phil

This is something I'm about to start on with the hope in bunging it
towards a magazine, though it will be a clamp meter.

:: I'm trying to design a simple battery meter/ammeter "thing"

Rather than use a resistor I'm going for the magnetic approach either
by using a Hall sensor or a AMR sensor.

The beauty here is that most of these have with a zero input current a
half supply output - in other words if your reference voltage to the
sensor is 5v then the zero output is 2.5v.

Bung an op-amp (this will depend on whether the sensor output is a
bridge type or not) in a differential/subtractor mode and as the
magnetic field goes positive the output will be towards 5v as the
field goes negative then it goes towards zero volts - the Pic ADC or a
poor mans resistor/cap ADC will then work.

Zetex do a range of AMR's in various forms, as do Honeywell.
For Hall sensors then there are many out there or you could look at
Sentron, however they've yet to reply about sending out their
evaluation kit - though they have sent an application note.

Zetex have two PDF's for download AN37 and AN39
Honeywell 126 page PDF called Hallbook.
GMW (http://www.gmw.com) have some downloads for the Sentron devices.


Colin



--
cdb, .....bodgy1KILLspamspam@spam@optusnet.com.au on Sunday,20 June,2004

I have always been a few Dendrites short of an Axon and believe me it
shows.

Light travels faster than sound. That's why some people appear bright
until they speak!

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@051447 by Russell McMahon

face
flavicon
face
> Rather than use a resistor I'm going for the magnetic approach either
> by using a Hall sensor or a AMR sensor.

GMR?

If in Oz, Jaycar have a quite cheap hall effect current measuring kit based
AFAIR on a Silicon Chip magazine article. Could be an OK starting point.
Should be able to be found on

       http://www.jaycar.com.au

       RM

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@070941 by Philip Pemberton

face picon face
In message <2004620184054.789801@laptop>
         cdb <bodgy1spamKILLspamOPTUSNET.COM.AU> wrote:

> Rather than use a resistor I'm going for the magnetic approach either
> by using a Hall sensor or a AMR sensor.
The problem is, this is a battery powered device with a 900mAh
nickel-metal-hydride battery pack. I need to get the power consumption down
to a bare minimum and keep it there for as long as possible.

OK, so the gist of it is, I want to do something like this:

Battery  |-X-** R **-----Ground
          |
          |        ------
          ---------> opamp\-----> PIC A/D In
                   |______/

So, rather than getting -1V to +1V at the resistor/battery junction, I get 0V
to 2V from the opamp's output, which gets fed to the PIC. The PIC has the
ability to enable the opamp as and when necessary, leaving it off when the
device is switched off. When the device wakes up (during charging or when the
user presses the "power" button), it powers up the opamp and reads the
current consumption figure. That figure is then used to make a rough
estimation of how long the battery is going to last.
Why am I doing it this way? Because 99% of the battery monitor ICs I've seen
can't handle being run off a single 1.2V battery. The other 1% are impossible
to get from any of my usual suppliers. Using a PIC12F675 to do the battery
monitoring seems like the best option.
Now, the clincher is, I know I can get the opamp to shift the voltage, but
that requires a negative supply. Is there any way to do the shifting with
just Vcc and ground?

Thanks.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
.....philpemKILLspamspam.....dsl.pipex.com              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.dsl.pipex.com/  | 48xCD, ARCINv6c IDE, SCSI
... We all have failures. The question is, what do we do with them?

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@104806 by Gerhard Fiedler

picon face
> OK, so the gist of it is, I want to do something like this:
>
> Battery  |-X-** R **-----Ground
>            |
>            |        ------
>            ---------> opamp\-----> PIC A/D In
>                     |______/
>
> So, rather than getting -1V to +1V at the resistor/battery junction, I get 0V
> to 2V from the opamp's output, which gets fed to the PIC. The PIC has the
> ability to enable the opamp as and when necessary, leaving it off when the
> device is switched off. When the device wakes up (during charging or when the
> user presses the "power" button), it powers up the opamp and reads the
> current consumption figure. That figure is then used to make a rough
> estimation of how long the battery is going to last.

Depending on your charger setup, you may be able to live with a second
current-sensing resistor between the charger and the battery. In a
high-side sensing configuration this could look like this:

     +---+--- Rcharge ---+--- Rload ---+---+
     |   |               |             |   |
     |   |<-- Ucharge -->|<-- Uload -->|   |
     |                   |                 |
  Charger             Battery             Load
     |                   |                 |
    Gnd                 Gnd               Gnd

Gerhard

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@112326 by David VanHorn

flavicon
face
At 12:51 AM 6/20/2004 +0100, Philip Pemberton wrote:

>Hi,
>  I'm trying to design a simple battery meter/ammeter "thing" with a
>PIC12F675. Problem is, I'm not much of an analog designer, and the analog bit is proving to be a little troublesome.

What you're attempting is called "high side" current sense.
You only need the one current sense resistor.

First, from both sides of your current sense resistor, bring down dividers, equal value resistors. 1%, or even hand matched.
Now you have Va/2 and Vb/2 where Va and Vb are the voltages on your current sense resistor.  We've just cut your current sense output in half, but now the voltages are nicely centered around half the battery voltage.  These resistors draw current from the battery all the time, so think large. 10k-100k would probably work.

From here, a differential amplifier can strip off the remaining DC offset, and add gain to the current sense voltage, and a following stage can add half your reference voltage, so that 128 counts or thereabouts, will be 0 current.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@113144 by Matthew Brush

flavicon
face
> >Hi,
> >  I'm trying to design a simple battery
> meter/ammeter "thing" with a
> >PIC12F675. Problem is, I'm not much of an analog
> designer, and the analog bit is proving to be a
> little troublesome.

Look at Allegro Micro Systems website.  They have some
nifty little ICs that will detect current and give a
voltage output between 0v and 5v. You can feed this
right into a PIC ADC or whatever you want.  I believe
they will send samples.

Here's the link:
http://www.allegromicro.com/hall/currentsensor.asp

Good Luck, Cheers



=====
MJ Brush
LeftClick.ca Internet Media Services
mbrush@[NOSPAM]leftclick.ca

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@135220 by Philip Pemberton

face picon face
In message <EraseME5.1.1.6.2.20040620101859.02155bb0spam_OUTspamTakeThisOuTmail.cedar.net>>          David VanHorn <dvanhornspamspam_OUTCEDAR.NET> wrote:

> First, from both sides of your current sense resistor, bring down dividers,
> equal value resistors. 1%, or even hand matched.
> Now you have Va/2 and Vb/2 where Va and Vb are the voltages on your current
> sense resistor.  We've just cut your current sense output in half, but now
> the voltages are nicely centered around half the battery voltage.  These
> resistors draw current from the battery all the time, so think large.
> 10k-100k would probably work.
OK, I see where you're going from there...

>  From here, a differential amplifier can strip off the remaining DC offset,
> and add gain to the current sense voltage, and a following stage can add
> half your reference voltage, so that 128 counts or thereabouts, will be 0
> current.
Not to play expert or anything, but I guess that means I'd need a negative
supply voltage for the opamp stages. At the moment, nothing else on the board
needs a negative supply. I suppose I could use a PIC based chargepump to
generate the negative supply, then use a Zener to clamp it.
Is there any way to implement the opamp stages without using a negative
supply?
Ordinarily I'd just put the charge pump in, but board space is very much at a
premium (think "Walkman sized") and I need to scavenge as much power from the
battery as possible. The switchmode regulator can only handle 90mA, and that
needs to power an MP3 decoder (30mA peak), a PIC (4mA peak) and a few other
bits and pieces (about 10mA). That leaves 45mA for "other stuff" like battery
gas-gauge and charge controllers :)

Thanks.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
@spam@philpemKILLspamspamdsl.pipex.com              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.dsl.pipex.com/  | 48xCD, ARCINv6c IDE, SCSI
... Did you know that no-one ever reads these things?

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@151923 by David VanHorn

flavicon
face
>
>Not to play expert or anything, but I guess that means I'd need a negative
>supply voltage for the opamp stages.

No, that's the whole point of rescaling it to battery/2

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@163055 by Mike Singer

picon face
Philip Pemberton wrote:
>   I've got a resistor that's been chosen to drop 10mV
> per milliamp of current through the resistor...
> ...the battery charges at 900mA


900 mA * 10 mv/ma = 9 volt across the resistor when charging
the battery?

Mike.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@170134 by David VanHorn

flavicon
face
At 11:29 PM 6/20/2004 +0300, Mike Singer wrote:

>Philip Pemberton wrote:
>>   I've got a resistor that's been chosen to drop 10mV
>> per milliamp of current through the resistor...
>> ...the battery charges at 900mA
>
>
>900 mA * 10 mv/ma = 9 volt across the resistor when charging
>the battery?

I thought he said 10mV/A?

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@170549 by Mike Singer

picon face
Philip Pemberton wrote:
> Not to play expert or anything, but I guess that means I'd
> need a negative supply voltage for the opamp stages. At the
> moment, nothing else on the board needs a negative supply.
> I suppose I could use a PIC based chargepump to generate
> the negative supply, then use a Zener to clamp it.
> Is there any way to implement the opamp stages without using
> a negative supply? Ordinarily I'd just put the charge pump
> in, but board space is very much at a premium ...

Another option:

Microchip TC510 - precision analog front end that implements dual slope A/D converters having a maximum resolution of 17 bits plus sign.
3-Pin Control Interface to Microprocessor
Single-Supply Operation Analog Input Range:- ±4.2V Max
Onboard negative power supply converter for single-supply
operation.

To calculate the resistor:
1. Full current range 1A; Let's assume resolution    1A/10000 = 0.1ma
2. This 0.1ma current is to produce    1.5 V /(2**17) = approx 0.01 mV
3. The resistor value
  0.01 mV / 0.1ma = 0.1 Ohm
So you could safely get 0.5 - 1.0 Ohm resistor.


Mike.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@171418 by Mike Singer

picon face
David VanHorn wrote:
> At 11:29 PM 6/20/2004 +0300, Mike Singer wrote:
>
> >Philip Pemberton wrote:
> >>   I've got a resistor that's been chosen to drop 10mV
> >> per milliamp of current through the resistor...
> >> ...the battery charges at 900mA
> >
> >
> >900 mA * 10 mv/ma = 9 volt across the resistor when charging
> >the battery?
>
> I thought he said 10mV/A?


It's easy to check.

Philip's original post:


> {Original Message removed}

2004\06\20@172040 by David VanHorn

flavicon
face
>
>
>It's easy to check.
>
>Philip's original post:
>
>>   I've got a resistor that's been chosen to drop 10mV per milliamp of
>> current through the resistor.


Well, I might back off on that resistor, unless the charge and load currents are rather small.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@172248 by cdb

flavicon
face
Yup seen that one Russell,

Want to be different and make some minor changes, but based on that
idea.  Already got my supply of ZMY20 sensors , just deciding on
whether to use discrete op-amps or a IA.

Colin
:: If in Oz, Jaycar have a quite cheap hall effect current measuring
:: kit based
:: AFAIR on a Silicon Chip magazine article. Could be an OK starting
:: point.
:: Should be able to be found on


--
cdb, KILLspambodgy1KILLspamspamoptusnet.com.au on Monday,21 June,2004

I have always been a few Dendrites short of an Axon and believe me it
shows.

Light travels faster than sound. That's why some people appear bright
until they speak!

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@172249 by Dwayne Reid

flavicon
face
At 05:08 AM 6/20/2004, Philip Pemberton wrote:

>OK, so the gist of it is, I want to do something like this:
>
>Battery  |-X-** R **-----Ground
>            |
>            |        ------
>            ---------> opamp\-----> PIC A/D In
>                     |______/
>
>So, rather than getting -1V to +1V at the resistor/battery junction, I get 0V
>to 2V from the opamp's output, which gets fed to the PIC.
>Now, the clincher is, I know I can get the opamp to shift the voltage, but
>that requires a negative supply. Is there any way to do the shifting with
>just Vcc and ground?

Yep - easy as pie.  There are several easy circuit configurations - I'll
describe one.

Configure your op-amp stage as an inverting amplifier with whatever gain
you desire (eg. -10).  In other words, voltage from current sense resistor
gets fed through a resistor to the (-) input of the op-amp.  Feedback
resistor is from op-amp output back to (-) input.  Gain is the ratio of
feedback resistor over input resistor.

Now offset the (+) input of the op-amp to a positive voltage.  Use a
resistor divider from some regulated supply such that the (+) pin is at
whatever voltage your want the zero current point to be.  For example, if
you wanted the zero current output voltage to be 1V.  If the gain is -10
and you want the idle point to be 1V, the desired offset at the (+) pin is
1V / 10 = 0.1V.  Notice that this voltage needs to be stable - if it
drifts, so does the zero current point (offset).

Now you have a setup where the op-amp is idling (offset) at 1V.  As your
circuit begins to consume current from the battery, the op-amp voltage
increases above the idle point.  The current consumption is the amount of
increase above that idle point.  In other words, I= (Vout - Voffset) /
(Resistor * Gain)

If the battery is charging, the op-amp voltage decreases below the zero
current offset.  Charge current is the amount of decrease below the idle
point.  I= (Voffset -Vout) / (Resistor * Gain)

In other words, all you have to do is introduce an offset into your amplifier.

The easiest way to calibrate this is to short the current sense resistor -
this allows you to measure or adjust the idle voltage.

The op-amp has to include ground within its common mode range - op-amps
that do this are usually described as "single supply" op-amps.  You want to
pick one that has fairly low Input offset voltage - one that comes to mind
is a LT1013.  There are *many* other choices.

Hope this helps.

dwayne

--
Dwayne Reid   <RemoveMEdwaynerTakeThisOuTspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 20 years of Engineering Innovation (1984 - 2004)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@172249 by Philip Pemberton

face picon face
In message <spamBeGone5.1.1.6.2.20040620160113.021e44c8spamBeGonespammail.cedar.net>>          David VanHorn <TakeThisOuTdvanhornEraseMEspamspam_OUTCEDAR.NET> wrote:

> >900 mA * 10 mv/ma = 9 volt across the resistor when charging
> >the battery?
>
> I thought he said 10mV/A?
That's close to what I meant.. I meant to say 1V per amp. Maybe I should stop
sending messages to the piclist so close to midnight...

Later.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
RemoveMEphilpemspamTakeThisOuTdsl.pipex.com              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.dsl.pipex.com/  | 48xCD, ARCINv6c IDE, SCSI
... Error 216: Tagline out of paper

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@172250 by Matthew Brush

flavicon
face
Maxim makes some nice high-side current sensing ICs as
well if the O.P. cares.

Cheers

=====
MJ Brush
LeftClick.ca Internet Media Services
mbrush@[NOSPAM]leftclick.ca

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@173548 by Philip Pemberton

face picon face
In message <000101c4570b$1fe1b940$3f7f6fc1@homebsr0mufzdy>
         Mike Singer <m_singerEraseMEspam.....POLUOSTROV.NET> wrote:

> > >900 mA * 10 mv/ma = 9 volt across the resistor when charging
> > >the battery?
> >
> > I thought he said 10mV/A?
>
>
> It's easy to check.
Okay, I'm off to bang my head against a wall a few times...

The correct figures are:
 Maximum current drained from battery:        250mA
 Maximum current sourced to battery (charge): 1A
 Resistor value:                              0.1 ohms
 Voltage drop at 1A:                          0.1V
 Reference voltage for AD converter:          3V
 AD resolution:                               8 bits

I've spent most of this evening playing with SPICE and I'm still no closer to
getting the opamp circuitry working. Two possibilities: 1) I'm doing
something wrong (most likely); 2) SPICE is fouling things again (it's done it
before and it wouldn't surprise me if it was doing it again now).
Anyone care to suggest an "intro to opamps and how to use them properly"-type
book or website? PICs I can do, algorithms I can do, but my analog skills are
incredibly rusty :-/

Thanks.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
EraseMEphilpemspamdsl.pipex.com              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.dsl.pipex.com/  | 48xCD, ARCINv6c IDE, SCSI
... Man who eats too many prunes, sits on toilet, many moons!

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@174445 by Mike Singer

picon face
Philip Pemberton wrote:
> That's close to what I meant.. I meant to say 1V per amp.

1V per amp is named 1 Ohm resistance.

Just for the record :-)

Mike.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@180558 by Mike Singer

picon face
Philip Pemberton wrote:
> Okay, I'm off to bang my head against a wall a few times...
>
> The correct figures are:
>   Maximum current drained from battery:        250mA
>   Maximum current sourced to battery (charge): 1A
>   Resistor value:                              0.1 ohms
>   Voltage drop at 1A:                          0.1V
>   Reference voltage for AD converter:          3V
>   AD resolution:                               8 bits


Philip,

Sorry for disturbing you again, but I see some
discrepancy in your figures.

You said:
Reference voltage for AD converter:     3V
AD resolution:                          8 bits

That is AD accuracy  +- 3V / 256 = 10 mV

>   Voltage drop at 1A:                0.1V
> Maximum current drained from battery: 250mA

That is voltage drop at 250mA would be 0.025V=25mV

Measuring 25mV range with the 10 mV accuracy?


Mike.

P.S. Don't bang your head against a wall. This
can't help. Better take some sleep :-)

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\20@184202 by Philip Pemberton

face picon face
In message <000001c45712$9d3dfe10$387f6fc1@homebsr0mufzdy>
         Mike Singer <RemoveMEm_singerEraseMEspamEraseMEPOLUOSTROV.NET> wrote:

> Measuring 25mV range with the 10 mV accuracy?
How about measuring 500mV range with 10mV accuracy, i.e. opamp gain set to
20? :)
25mV * 12 = mV range, 10mV accuracy = 50 steps.
100mV * 12 = 1.2V range (charge), 10mV accuracy = 120 steps.

Of course, I could up the accuracy of the PIC's AD converter to 10 bits,
which would give...
3 / 1024 = 0.00293V = 2.93mV = 3mV accuracy

> P.S. Don't bang your head against a wall. This
> can't help. Better take some sleep :-)
I would if I had the time... I've got two coursework assignments due tomorrow
morning. Looks like another all-nighter for me :-(

Later.
--
Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
RemoveMEphilpemspam_OUTspamKILLspamdsl.pipex.com              | ViewFinder, 10BaseT Ethernet, 2-slice,
http://www.philpem.dsl.pipex.com/  | 48xCD, ARCINv6c IDE, SCSI
... Where's my 640Meg SIMM? I want to run Excel!

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\06\21@070148 by Gerhard Fiedler

picon face
> Now offset the (+) input of the op-amp to a positive voltage.  Use a
> resistor divider from some regulated supply such that the (+) pin is at
> whatever voltage your want the zero current point to be.  For example, if
> you wanted the zero current output voltage to be 1V.  If the gain is -10
> and you want the idle point to be 1V, the desired offset at the (+) pin is
> 1V / 10 = 0.1V.  Notice that this voltage needs to be stable - if it
> drifts, so does the zero current point (offset).

As long as you derive it from the same voltage that you are using as ADC
reference, it will only drift with the resistors that you are using for the
divider.

Gerhard

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\06\21@113024 by Harold Hallikainen

face picon face
I have not read the whole thread, so excuse me if I'm suggesting something
that's already been suggested. The message I just read suggested voltage
dividers from each side of a current sense resistor down to a differential
amplifier. It seems that it will be extremely difficult to get the voltage
divider resistors to match well enough both initially and over
termperature variations to get useful measurements out of such a circuit.
There are differential amplifiers designed for high side current sense.
I've used the MAX4073 with great success.

If the voltage on the high side is too much for one of these amplifiers,
there's always high voltage differential amplifiers like the AD629
(http://www.analog.com/Analog_Root/productPage/productHome/0,2121,AD629,00.html),
which can handle +/-270V common mode input voltage.

Harol

--
FCC Rules Online at http://www.hallikainen.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\06\21@120601 by David VanHorn

flavicon
face
At 08:29 AM 6/21/2004 -0700, Harold Hallikainen wrote:

>I have not read the whole thread, so excuse me if I'm suggesting something
>that's already been suggested. The message I just read suggested voltage
>dividers from each side of a current sense resistor down to a differential amplifier. It seems that it will be extremely difficult to get the voltage divider resistors to match well enough both initially and over termperature variations to get useful measurements out of such a circuit.

You can easily hand match them to <1%, and if they are all the same type, they should track closely.


>There are differential amplifiers designed for high side current sense.
>I've used the MAX4073 with great success.

So how did they do it before Maxim?

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\06\22@082453 by Kyrre Aalerud

flavicon
face
I am making a speed controller with current-logging and am using the
hall-sensor approach.
Basically I have a sensor with 3 mV/Gauss sensitivity and at 5v supply it
will be nominally at 2.5v out with linear operations to 0.5 and 4.5 volts.
Since I will be measuring large currents I use a thick wire through a
ferrite toroid and have a slit in the toroid where the sensor is glued in.
I don't wind the wire on the toroid as it needs to be too thick.

Don't know how well this will work yet, but I had the foresight to add a
amplifier with adjustable gain so I can amplify to correct signal-strength
before before having to read it with the PIC.  This setup registers both
posetive and negative current.

Kyrre



{Original Message removed}

2004\06\22@120012 by Dwayne Reid

flavicon
face
At 09:29 AM 6/21/2004, Harold Hallikainen wrote:
>I have not read the whole thread, so excuse me if I'm suggesting something
>that's already been suggested. The message I just read suggested voltage
>dividers from each side of a current sense resistor down to a differential
>amplifier.

The original poster has a resistor in the ground leg of the battery.  He
wants to measure current into or out of the battery.  Seems like a simple
problem - all he needs is a way to offset the op-amp he is using to amplify
that low bipolar voltage into a higher level voltage without needing a
negative supply rail.  In other words, a simple gain plus offset op-amp stage.

dwayne


--
Dwayne Reid   <RemoveMEdwaynerTakeThisOuTspamspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 20 years of Engineering Innovation (1984 - 2004)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

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