Searching \ for '[PIC]: Amp meter with pic?' 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/microchip/devices.htm?key=pic
Search entire site for: 'Amp meter with pic?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Amp meter with pic?'
2002\10\29@175054 by Tony Harris

flavicon
face
Does anyone have any references on this type of thing?  Basically, I'm
working on a different circuit, but would like at times to randomly check
current flowing thru the main circuit.  I figure I need to use some sort of
resistive network to get a volt reading for the adc, but I am not sure of
how to do it.

-Tony

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


2002\10\29@180336 by Dave Mumert

flavicon
face
Hi Tony

Maxim has some ICs for current measurement, some even have voltage
references built in.

Check at http://www.maxim-ic.com/PowerSupplies.cfm

Dave
> Does anyone have any references on this type of thing?  Basically, I'm
> working on a different circuit, but would like at times to randomly check
> current flowing thru the main circuit.  I figure I need to use some sort
of
> resistive network to get a volt reading for the adc, but I am not sure of
> how to do it.
>
> -Tony

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


2002\10\29@181107 by Larry Bradley

flavicon
face
I've done a fair bit of that - in fact, my current project is a volt-meter,
ammeter, and amp-hour meter for my sailboat - measuring currents of +-\/-
100 amps.

Tell us more about what you are doing. Do you want to measure the current
in the +ve lead of the supply or the -ve lead? What sort of current? What
sort of accuracy/precision?

Larry


At 04:44 PM 10/29/2002 -0600, you wrote:
{Quote hidden}

Larry Bradley
Orleans (Ottawa), Ontario, CANADA

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


2002\10\29@182030 by Rick C.

flavicon
face
Check the pic archives around mid-June or earlier. There was a F84 type ammeter
project I think was originally in an "Electronics Australia" magazine.
Rick

Tony Harris wrote:

{Quote hidden}

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


2002\10\29@182736 by Tony Harris

flavicon
face
I actually need one measurement on +Ve and one on -Ve.

Basically, I'm trying to upgrade my "homebrew" power supply to display other
information.

Currently, there is a negative supply and a positive supply (which is why I
need two seperate measurements).

volt range is 1.2volts - ~16Volts max draw @ 1.0amp (I can actually squeeze
a little more out of it, but the regulators are only rated for 1.5 amps and
they start getting rather hot at 1 amp).

I've already gotten the volt meter portion figured out.

It doesn't have to be as accurate as accurate can be - I'd like it to be
accurate to within 1mA, but that might be asking too much for a first time
ammeter design ;)

I just really am not sure where to start.  I was thinking of inserting a
shunt resistor of sorts and branching off a parallel resistive circuit to
drop voltage down to the useable range of the pic and do some math based
upon the resistor I'm measuring across, but I realized I wasn't sure if this
really was the right way to go.

Any suggestions would be most appreciative.

-Tony

{Original Message removed}

2002\10\29@192919 by William Chops Westfield

face picon face
I have a hypothetical "hobbyist power supply" that I'm thinking about
(partially inspired by the recently mentioned dead bench power supply I'd
mentioned elsewhere, and also by accidentally buying too many LM317s.)  It
would provide CCCV output, 0-20V or so at about 1A max.  I'd use a 24V or so
wall wart input, a bunch of LM317 style regulators, and a PIC with LED/LCD
to display voltage and current.  This is, in theory, the sort of thing a
hobbyist could build easilly and cheaply from surplus parts, but would cost
a pretty bundle if you tried to make it from NEW parts.

There are a couple of complications that have already turned up...
The obvious way to measure the not-so-large currents I'm thinking of
is to put something like a 0.1 ohm power resistor in the output, and
measure the maximum voltage of I*R (.15V) to get current (at 1.5A max,
you only need to dissipate about 1/4W...)  HOWEVER, unless your PIC
has a completely separate and isolated power supply, you're not measuring,
0.15V, you're measuring the difference between two voltages that are...
quite high compared to what you can connect to a PIC input, or even your
average opamp.  Isolated power supplies might be tempting (add another
$0.99 wall wart), but lack elegance :-)  Batteries might be OK for an
LCD display...

LM317 info is sketchier than I'd have thought as well.  The data sheets all
have a basic switching regulator, and a circuit that uses a separate LM317
as a pre-regulator, but little in the way of explanation, and no obvious
extension of "switching pre-regulator."  There's circuits that parallel 317s
for increased output capability, but again there is little explanation, and
those circuits aren't combined with the current limitter circuits...  If
anyone knows of any more complete ... tutorials on using the LM317, please
let me know!

BillW

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


2002\10\29@194616 by Dwayne Reid

flavicon
face
Since this is a single supply with no reference common to anything else,
put the current sense resistor in the ground lead.  No problem!

dwayne

At 04:28 PM 10/29/02 -0800, William Chops Westfield wrote:
{Quote hidden}

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

Celebrating 18 years of Engineering Innovation (1984 - 2002)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
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


2002\10\29@223356 by Larry Bradley

flavicon
face
You need a shunt - a small-value resistor in series with the output. It
should drop a negligible voltage compared to the supply voltage. In this
case, say 0.1 volt for 1 amp current. That calls for a 0.1 ohm resistor.

This goes in the -ve side of the power supply - i.e. the negative side of
the supply goes to one side of the resistor, and the other side goes to the
-ve output terminal.

Now you use an op-amp to increase the 0.1 volts to (say) 4 or 5 volts in
order to feed the A/D converter of a PIC.

The 10 bit A/D of the PIC will give you a resolution of 1 part in 1024, so
you will be able to read as low as 1 ma.

You need a half-decent opamp in this case - one with low offset voltage and
low offset drift with time and temperature - something like an Analog
Devices OP07 or OP37.

Larry



At 05:30 PM 10/29/2002 -0600, you wrote:
{Quote hidden}

>{Original Message removed}

2002\10\29@223403 by Larry Bradley

flavicon
face
As someone else mentioned, put the shunt resistor in the -ve lead of the
supply. You can put it in the +ve side, but then as you noted, you are now
trying to measure the difference between two voltages. This can be done in
a couple of ways - one of the easiest is to use one of the MAXIM high-side
current sensing ICs. Another way is with an op-amp in a differential
amplifier configuration - this can be messy, since you need closely matched
resistors.

Best bet is to design the supply with the current-sense resistor in the -ve
side of the supply.

Larry


At 04:28 PM 10/29/2002 -0800, you wrote:
{Quote hidden}

Larry Bradley
Orleans (Ottawa), Ontario, CANADA

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


2002\10\30@163313 by Olin Lathrop

face picon face
> I have a hypothetical "hobbyist power supply" that I'm thinking about
> (partially inspired by the recently mentioned dead bench power supply
I'd
> mentioned elsewhere, and also by accidentally buying too many LM317s.)
It
> would provide CCCV output, 0-20V or so at about 1A max.  I'd use a 24V
or so
> wall wart input,

That's a pretty beefy wall wart!  I think you will more easily find a
"bench top" transformer that has two cords.  One cord is the wall AC in,
the other the low voltage AC out.  Why not just get a real transformer and
make it part of your power supply.  That way you can plug your power
supply direction into the wall without anything else dangling.

> There are a couple of complications that have already turned up...
> The obvious way to measure the not-so-large currents I'm thinking of
> is to put something like a 0.1 ohm power resistor in the output, and
> measure the maximum voltage of I*R (.15V) to get current (at 1.5A max,
> you only need to dissipate about 1/4W...)  HOWEVER, unless your PIC
> has a completely separate and isolated power supply, you're not
measuring,
> 0.15V, you're measuring the difference between two voltages that are...

A diff amp can fix this well enough for the accuracy you need.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.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


2002\10\30@163525 by Olin Lathrop

face picon face
> Since this is a single supply with no reference common to anything else,
> put the current sense resistor in the ground lead.  No problem!

That just moves the problem of having a floating differential voltage for
voltage feedback instead of for current feedback.  I'd rather use a diff
amp to sense the current and keep all the grounds common.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.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


2002\10\31@172057 by Harold Hallikainen

picon face
    I haven't been following this thread closely, but thought I'd throw in a couple items. Maxim has a couple high side current sense amps. One of them even has a built in sense resistor, as I recall. I'm using one of their high side sense amps with a gain of 20 in a design I'm laying out the board for right now.
    Also, someone (maybe it was National) has a high side current sense chip with a built-in sense resistor. It outputs a PWM signal that is 50% when the current is 0A. It goes above and below 50% as the current direction and magnitude varies. It handles up to +/- 7A. I used it in a solar car battery charger a few years ago. The PWM is nice to interface to a PIC.

Harold





________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit http://www.juno.com

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


2002\10\31@173524 by William Chops Westfield

face picon face
   That just moves the problem of having a floating differential voltage for
   voltage feedback instead of for current feedback.  I'd rather use a diff
   amp to sense the current and keep all the grounds common.

Differential isn't so bad if the absolute values are low enough.  For
voltages, I think you can do just fine with a simple voltage divider
based on maximum output voltages, but for current I would think that the
errors introduced are too big compared to the values you're measuring.

BillW

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



'[PIC]: Amp meter with pic?'
2002\11\01@080555 by Olin Lathrop
face picon face
> Differential isn't so bad if the absolute values are low enough.  For
> voltages, I think you can do just fine with a simple voltage divider
> based on maximum output voltages, but for current I would think that the
> errors introduced are too big compared to the values you're measuring.

The original discussion was about a benchtop power supply, not a precision
instrument.  You should be able to get a ground-referenced voltage that
indicates load current to within a few percent accross the input supply
range.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


2002\11\01@100143 by Micro Eng

picon face
are we talking about sensing AC or DC currents?  DC has alot of chips out
there with built in sense resistors.  AC...diff animal...



_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body


2002\11\01@155514 by Tony Harris

flavicon
face
DC only.  :)  At least in regards to my needs.

-Tony
----- Original Message -----
From: "Micro Eng" <.....micro_engKILLspamspam.....HOTMAIL.COM>
To: <EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU>
Sent: Friday, November 01, 2002 8:59 AM
Subject: Re: [PIC]: Amp meter with pic?


> are we talking about sensing AC or DC currents?  DC has alot of chips out
> there with built in sense resistors.  AC...diff animal...
>

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2002\11\02@225559 by Dwayne Reid

flavicon
face
At 04:33 PM 10/30/02 -0500, Olin Lathrop wrote:
> > Since this is a single supply with no reference common to anything else,
> > put the current sense resistor in the ground lead.  No problem!
>
>That just moves the problem of having a floating differential voltage for
>voltage feedback instead of for current feedback.  I'd rather use a diff
>amp to sense the current and keep all the grounds common.

Huh? I guess that I am missing something.

Assume that the shunt is sized such that you drop 0.5V or 0.1V at full
rated output current.  Also assume that the current consumed by the
regulator circuit is small compared to the output current.

Consider the power supply to be built up from 2 functional blocks.  The
block on the left hand side is the power transformer / rectifiers / bulk
reservoir.  The block on the right is the regulator.

Connect the current sense shunt in the negative leg between the 2
blocks.  Note that the voltage feedback is still from the output terminals
of the supply and that any voltage dropped across the shunt has no effect
on the output voltage.

It is then a pretty simple matter to re-arrange the regulator block such
that those nodes that supply significant ground current are moved to the
input side of the shunt, leaving the reference and voltage error amp
referenced to the negative output terminal.

Like I said - no problem!

dwayne

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

Celebrating 18 years of Engineering Innovation (1984 - 2002)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
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: To leave the PICList
KILLspampiclist-unsubscribe-requestKILLspamspammitvma.mit.edu


2002\11\02@232356 by William Chops Westfield

face picon face
   >That just moves the problem of having a floating differential voltage for
   >voltage feedback instead of for current feedback.  I'd rather use a diff
   >amp to sense the current and keep all the grounds common.

   Huh? I guess that I am missing something.

I believe that he thinks that we'll want the PIC to measure voltage as well
as current, which hasn't been said, but is correct (at least in my case.)
The voltage feedback for the regulator itself doesn't require that the
"ground" side of the output be at the 0V potential of the internal
circuitry, ESPECIALLY for the LM317 and similar...

BillW

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


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