Searching \ for '[PIC] How to read Battery voltage 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/power/batterys.htm?key=battery
Search entire site for: 'How to read Battery voltage with PIC'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] How to read Battery voltage with PIC'
2005\11\14@200831 by fred jones

picon face

Hi all,
I'm sure this is an easy question for many of you so I hope I don't get
flamed.  I searched but can't find the answer in the archives although I'm
sure it must be there somewhere.  This is not my strong point so I thought
I'd ask for help.

I am building a device that will run off of a 12V gel cell battery.  It will
use a 16F877 PIC powered with a 7805 regulator.  I'd like to be able to read
the voltage of the gel cell and display it on the 2X16 LCD display.  I'm
sure I can't connect the 12V batter into the A2D of the PIC but I'm not sure
what the proper method would be.  Any help is appreciated.
Thanks for your time,
FJ


2005\11\14@204739 by Padu

picon face
part 1 2120 bytes content-type:text/plain; (decoded 7bit)

Amazing timing, I had the same question a few days ago. I knew how to do a
voltage divider, but I was having problems when connecting the output of a
voltage divider directly into the PIC's ADC port. Turns out that the PIC was
"loading" the circuit, according to some experts, and I needed to isolate
the two circuits (the divider and the ADC). Someone suggested that an opamp
with unit gain would do this task, since it has a very high input impedance
and a low impedance output. That's what I did, and it worked fine for 12V.
When I tested with my 14.4V NiMH batteries, I would still have a small
offset from what I was reading with the DMM, so I've included the 10K
resistor in the feedback loop and the measurements were equal again.

Well, I'm in a rush to leave now, so I realize that you might have a hard
time understanding what I did. If you do, please write again and I'll try to
clarify...

I've included the schematics of the sample circuit I did. 14.4V is supposed
to be read as 3.99V


If the list gods see anything wrong in my circuit, please tell me as there
is still time for fixing.


Cheers

Padu

{Original Message removed}

2005\11\14@204829 by Andre Abelian

flavicon
face
Fred,

easiest way is use 1% tolerance resistor divider with 5,1 v ziner diode
connected
to ground to protect pic. on top of  ziner add ceramic and electrolytic cap.
this means when your battery is 14,4 v  pic will get 5 v or you can set
to any voltage.
more expensive way is to use leaner opto-coupler this is good for noise etc.

Andre Abelian




fred jones wrote:

{Quote hidden}

2005\11\14@205424 by rosoftwarecontrol

flavicon
face
I believe this "how measuring V" problem,
should be changed into "how to filter V measured".

To designe a third order pi/T filter, that are all
being needed. Or resistant net is asked?



{Original Message removed}

2005\11\14@205758 by Jinx

face picon face
> can't connect the 12V battery into the A2D of the PIC

Use a high-value (100s of k or megohms) resistive divider
into a high-Z input, low-power op-amp (eg TLC271, 10uA
operating) to give you the drive for the A2D. Op-amp Vcc
is from a PIC pin so it can be turned off to minimise drain

Could even use a FET / transistor to disconnect the divider too

However, as the regulator is a hungry hungry hippo 7805
(Iref ~ 5mA), a few 10s of uA isn't really going to make that
much difference, so you could go with a lower-R divider,
just enough to meet the A2D input Z

Different if you wanted as complete a power-down as possible,
then you'd be looking at regulator power management too

2005\11\14@215828 by rosoftwarecontrol

flavicon
face
I don't believe it is worth to add a op to
divide V for ADC acting as a load!

I think ADC as a fixed input Z load!
Simple 100K 10 turn pot as divider,
has below part parallel with ADC's Z,
it will give accurate enough V dividing!


By adding a op, you add error as well!
And I believe, this error is not smaller than
above, where simplifying ADC as a pure R.





{Original Message removed}

2005\11\14@224643 by Mark Rages

face picon face
On 11/14/05, microsoftwarecontrol <spam_OUTmicrosoftwarecontrolTakeThisOuTspamyahoo.ca> wrote:
> I don't believe it is worth to add a op to
> divide V for ADC acting as a load!
>
> I think ADC as a fixed input Z load!
> Simple 100K 10 turn pot as divider,
> has below part parallel with ADC's Z,
> it will give accurate enough V dividing!
>

This is a bad idea, for at least four reasons:

1) It is an unnecessary adjustment.

2) It is an unnecessary expense.

3) If someone turns the pot the wrong way, the full 12V battery will
be applied to the ADC input, resulting in destruction of the
microcontroller.  A good design should not be destroyed by
misadjustment.

4) I quote the Complete Mid-Range Reference Manual:

"The maximum recommended impedance for analog sources is 10 k."

A 100k potentiometer can give up to 25k Thevenin impedance.  You can
expect some noise if you do this.

>
> By adding a op, you add error as well!

You add the offset voltage of the op-amp.  Op amps with less than a
millivolt of offset are inexpensive and widely available.

> And I believe, this error is not smaller than
> above, where simplifying ADC as a pure R.

Measurement noise will be less, compared to driving the ADC with a too
high impedance. I learned the hard way, too high impedance will lead
to several LSBs of noise on the measurement.

Here's my 'simplest possible' design:
>From 12V to ADC pin, 6k 1% resistor.
>From ADC pin to ground, 4k 1% resistor.
Bypass the 4k resistor with a 0.1 uF capacitor.

This will spill 1.2 mA through the voltage divider.  If your reference
voltage is Vcc, accuracy will be limited by the 7805's accuracy, which
can be as bad as +/- 4%.

The ADC voltage will be 4.0 volts at 12 volts input.  I like to leave
a little headroom like this, because you never know when an
overvoltage can happen.  If severe overvoltage is possible, a 5.1V
zener will protect the microprocessor.

Regards,
Mark Rages
markrages@gmail
--
You think that it is a secret, but it never has been one.
 - fortune cookie

2005\11\14@225029 by Mark Rages

face picon face
On 11/14/05, Mark Rages <.....markragesKILLspamspam@spam@gmail.com> wrote:
> Here's my 'simplest possible' design:
> From 12V to ADC pin, 6k 1% resistor.
> From ADC pin to ground, 4k 1% resistor.
> Bypass the 4k resistor with a 0.1 uF capacitor.

First resistor should be 8k.  Sorry, brain's tired.

Regards,
Mark
markrages@gmail
--
You think that it is a secret, but it never has been one.
 - fortune cookie

2005\11\14@225739 by Jinx

face picon face
> I think ADC as a fixed input Z load!
> Simple 100K 10 turn pot as divider,
> has below part parallel with ADC's Z,
> it will give accurate enough V dividing!

100k is higher than MC recommendation and you'd
have to adjust the sampling time, as well as consider
the internal leakage

http://ww1.microchip.com/downloads/en/AppNotes/00693a.pdf

For a DC signal it's perfectly possible that you'd get good
results with an "out of spec" source impedance

> By adding a op, you add error as well!
> And I believe, this error is not smaller than
> above, where simplifying ADC as a pure R.

Not necessarily - the op-amp can be trimmed for off-set

2005\11\15@082153 by Mchipguru

picon face
I usea a voltage divider (simple resistor pair) to bring the max voltage within range of A/D. I then scale the reading from the A/D to the voltage and determine battery state from that.
Larry
{Quote hidden}

> --

2005\11\15@083305 by olin piclist

face picon face
fred jones wrote:
> I am building a device that will run off of a 12V gel cell battery.  It
> will use a 16F877 PIC powered with a 7805 regulator.  I'd like to be
> able to read the voltage of the gel cell and display it on the 2X16 LCD
> display.  I'm sure I can't connect the 12V batter into the A2D of the
> PIC but I'm not sure what the proper method would be.

Use a resistor divider from the 12V so that the maximum possible battery
voltage is a bit under 5V.  Adjust the resistors so that the impedence seen
from the A/D input is a bit under 10Kohms.  Note that you are using the 7805
output voltage as a reference, and the error of the resistors is added to
that.  That should be fine for just reading a battery level, but you should
keep the overall accuracy in mind.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\15@084759 by Enrico Schuerrer

picon face
part 1 3222 bytes content-type:text/plain; (decoded quoted-printable)

>From the database of the PIC you will find, that the input impedance of the
ADC-pin is 100 kOhms and the max input voltage is Vdd. You have to divide
the Voltage of your Gel-accu in this way that in no circumstances more than
Vdd can be present at the ADC-pin.
When you load your Gel-accu the voltage can climb up to 15 V DC - so in
minimum a divider 3:1 is necessary, 4:1 will bring you to the save side. Due
to the fact that there can be noise/spikes on the loading voltage for the
Gel-accu a RC-Filter can be of help to reduce the influence.

Solution 1: Simple divider by resistances

R1 is the resistor from the accu to the ADC pin, R2 the resistor from
ADC-pin to ground.

Choose R1 10 kOhms, then R2 will be 3448 Ohms, a 1% 3,48 kOhm will give you
enough accuracy (max. 1.9% error). If this accuracy is not enough, you have
to sort out a handfull of 3,48 kOhm resistors to find one which is nearer to
3.448 kOhms.

For the AC characteristics the network should be of low impedance at 120 Hz
(if you use a 60 hertz AC) or 100 Hz, if you use a 50 Hz AC for loading the
accu.

The 3 db-point of a lowpass filter is typically f = 1/ 2*pi*R*C - in our
case R is 2.86 kOhms (the value of R1 parallel to R2 parallel to the input
impedance of the ADC).

f should be low against the 120 Hz/100 Hz, so we choose it with 30 Hz. If
we bring this values into the equation the calculated C (parallel to R2) has
to be > 1.85 F, choosing 2.2 F.

The conditions for the C are fulfilled - the loading impedance for the ADC
is low enough to have no problems with the LSB showing (stated in AN689a),
the AC attenuation for 60 Hz is around 12 dB - and we need only 3
components.

Solution 2: Divider and Voltage follower/filter

The voltage follower will bring in minimum 2 advantages - transforming of
the input impedance to nearly infinite (which means around 100 MOhms) and
steeper filtering curve (which means better AC/spike attenuation). The
disadvantages are clear: more components, additional offset voltage error,
higher cost.

The attached picture will show solution 2.

Regards

Enrico




> {Original Message removed}

2005\11\15@090654 by rosoftwarecontrol

flavicon
face
correct.

But, on my hand, I have plenty of
100k pot and I don't have spare
money for "parameter luxury".
I did give longer sample time
in adc_do();


{Original Message removed}

2005\11\15@090931 by olin piclist

face picon face
Enrico Schuerrer wrote:
> From the database of the PIC you will find, that the input impedance
> of the ADC-pin is 100 kOhms

Huh?  What "database of the PIC"?  This sounds like nonsense to me.  Site
your reference.

2005\11\15@091559 by olin piclist

face picon face
microsoftwarecontrol wrote:
> But, on my hand, I have plenty of
> 100k pot and I don't have spare
> money for "parameter luxury".
> I did give longer sample time
> in adc_do();

But long sampling time isn't the only problem caused by high source
impedence.  The leakage current of the A/D input times the impedence causes
an offset that can't be corrected for by increasing the sampling time.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\15@091738 by Maarten Hofman

face picon face
> Huh?  What "database of the PIC"?  This sounds like nonsense to me.  Site
> your reference.

Now I know this is not PICmicro related, but I really like that pun...
Thank you, Olin, it made me feel better this morning.

Greetings,
Maarten Hofman.

2005\11\15@092100 by Mike Harrison

flavicon
face

{Quote hidden}

Look under 'measuring battery voltage' here :
http://www.electricstuff.co.uk/picavrstuff.html

2005\11\15@092214 by rosoftwarecontrol

flavicon
face
should be 10Kom?

----- Original Message -----
From: "Olin Lathrop" <EraseMEolin_piclistspam_OUTspamTakeThisOuTembedinc.com>
To: "Microcontroller discussion list - Public." <piclistspamspam_OUTMIT.EDU>
Sent: Tuesday, November 15, 2005 9:11 AM
Subject: Re: [PIC] How to read Battery voltage with PIC


> Enrico Schuerrer wrote:
> > From the database of the PIC you will find, that the input impedance
> > of the ADC-pin is 100 kOhms
>
> Huh?  What "database of the PIC"?  This sounds like nonsense to me.  Site
> your reference.
>
> --

2005\11\15@093122 by Enrico Schuerrer

picon face
Olin, I got this out of the PIC datasheet of the database from Microchip.
And this is absolutely no nonsense, please check your statements, thanks.

Enrico


{Original Message removed}

2005\11\15@093122 by olin piclist

face picon face
Maarten Hofman wrote:
>> Huh?  What "database of the PIC"?  This sounds like nonsense to me.
>> Site your reference.
>
> Now I know this is not PICmicro related, but I really like that pun...
> Thank you, Olin, it made me feel better this morning.

I'm glad you're feeling better, but you lost me.  I guess I'm being dense.
What pun?


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\15@093512 by olin piclist

face picon face
microsoftwarecontrol wrote:
>>> From the database of the PIC you will find, that the input impedance
>>> of the ADC-pin is 100 kOhms
>>
>> Huh?  What "database of the PIC"?  This sounds like nonsense to me.
>> Site your reference.
>
> should be 10Kom?

No, that's even worse.  These are CMOS inputs.  How could Microchip specify
up to 10Kohms source impedence if the A/D pin itself has a 10Kohm impedence?
*Think* about it.

2005\11\15@094342 by olin piclist

face picon face
Enrico Schuerrer wrote:
> Olin, I got this out of the PIC datasheet of the database from
> Microchip. And this is absolutely no nonsense, please check your
> statements, thanks.

So go ahead and prove me wrong.  I challenge you to cite a specific document
and page number.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\15@095614 by Maarten Hofman

face picon face
> I'm glad you're feeling better, but you lost me.  I guess I'm being dense.
> What pun?

Using "Site" instead of "Cite", thereby implying that you want the
reference to appear in a weblink rather than an old fashioned
document. I thought it was a very neat way of putting it, and this was
the first time I heard it.

Greetings,
Maarten Hofman.

2005\11\15@101232 by Michael Rigby-Jones

picon face


>-----Original Message-----
>From: @spam@piclist-bouncesKILLspamspammit.edu [KILLspampiclist-bouncesKILLspamspammit.edu]
>Sent: 15 November 2005 14:56
>To: Microcontroller discussion list - Public.
>Subject: Re: [PIC] How to read Battery voltage with PIC
>
>
>> I'm glad you're feeling better, but you lost me.  I guess I'm being
>> dense. What pun?
>
>Using "Site" instead of "Cite", thereby implying that you want
>the reference to appear in a weblink rather than an old
>fashioned document. I thought it was a very neat way of
>putting it, and this was the first time I heard it.

I thought the pun in "Site your reference" you were refering to was reference, as in Vref ;-)

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2005\11\15@104210 by Enrico Schuerrer

picon face
I'm afraid I can't prove you wrong. When I searched through the Website of
Microchip for the input impedance of PIC16F family I found 100 kOhms. After
you stated that this can be wrong I searched again and found that I mistake
the impedance of the Vref pin with the impedance of the ADC input.

Now I have learned that most 16Fxxx will have an impedance depending on Vdd,
mostly 10 kOhms at 5 V Vdd.
Thank you for the lesson but let me add a tiny remark: I would appreciate
casual conversation, please.

So if the input impedance is 10k, for solution 1 R1 should be 3k32, R2 1k24
and C > 6µ3. In solution 2 there is no change necessary.

kind regards

Enrico

BTW the document is
http://ww1.microchip.com/downloads/en/DeviceDoc/31023a.pdf , page 7


{Original Message removed}

2005\11\15@105433 by olin piclist

face picon face
Maarten Hofman wrote:
> Using "Site" instead of "Cite", thereby implying that you want the
> reference to appear in a weblink rather than an old fashioned
> document. I thought it was a very neat way of putting it, and this was
> the first time I heard it.

Actually that was me just being dense about the spelling.  Sorry.

******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\15@110722 by olin piclist

face picon face
Enrico Schuerrer wrote:
> Now I have learned that most 16Fxxx will have an impedance depending on
> Vdd, mostly 10 kOhms at 5 V Vdd.

You are confusing A/D pin input impedence with the source impedence
specified by Microchip for the A/D to work correctly.  PIC A/D inputs are
CMOS, and have a very high imput impedence, certainly way more than
100Kohms.  Microchip recommends no more than 10Kohm *source* impedence to
avoid offset errors due to the pin leakage current on the older A/Ds.  Some
newer ones are specified for a much lower source impedence.

> BTW the document is
> http://ww1.microchip.com/downloads/en/DeviceDoc/31023a.pdf , page 7

And this shows 100nA maximum pin leakage.  At 5V this is equivalent to
50Mohms, although it doesn't actually work quite like that.  Still this is
why the claim of 100Kohm impedence was clearly way too low.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\15@111345 by Michael Rigby-Jones

picon face


>-----Original Message-----
>From: RemoveMEpiclist-bouncesTakeThisOuTspammit.edu [spamBeGonepiclist-bouncesspamBeGonespammit.edu]
>Sent: 15 November 2005 15:43
>To: Microcontroller discussion list - Public.
>Subject: Re: [PIC] How to read Battery voltage with PIC
>
>
>I'm afraid I can't prove you wrong. When I searched through
>the Website of Microchip for the input impedance of PIC16F
>family I found 100 kOhms. After you stated that this can be
>wrong I searched again and found that I mistake the impedance
>of the Vref pin with the impedance of the ADC input.
>
>Now I have learned that most 16Fxxx will have an impedance
>depending on Vdd, mostly 10 kOhms at 5 V Vdd.

Enrico, note that the datasheet does not specify the input impedance. It suggests a maximum source impedance of 10k (or 2.5k for 18F parts), which is a very different parameter.  The A/D input impedance is very hard to specify as it consists of a leakage current and a capacitive load.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2005\11\15@112924 by Alan B. Pearce

face picon face
>So if the input impedance is 10k,

Umm, it is not the input impedance of the chip. It is the source impedance
from which the chip draws current to charge a capacitor on the chip. If the
source impedance is any higher then leakage currents in the chip, and
increased charge time of the capacitor introduce errors into the ADC
reading.

2005\11\15@114304 by Enrico Schuerrer
picon face
> Enrico, note that the datasheet does not specify the input impedance. It
suggests a maximum source impedance > of 10k (or 2.5k for 18F parts), which
is a very different parameter.  The A/D input impedance is very hard to >
specify as it consists of a leakage current and a capacitive load.


But then, if the source impedance is below 10k and the load impedance is >
MOhms it should be no problem to calculate a 4:1 divider - so R1 is 3k74, R2
is 1k24. The source impedance is the parallel result of R1 and R2 (0.9k). It
must be accurate enough for a battery indicator, even if Vref is not really
accurate (+/- 5% of the 7805) - the max error is then in the worst case
around 10% including the 1/2 LSB error.

Thanks again for the help for a µC newcomer, but not a newcomer in
electronics engineering :-)

Regards

Enrico
OE1EQW (for the hams in the list)

----- Original Message ----- From: "Michael Rigby-Jones" <TakeThisOuTMichael.Rigby-JonesEraseMEspamspam_OUTbookham.com>
To: "Microcontroller discussion list - Public." <RemoveMEpiclistspamTakeThisOuTmit.edu>
Sent: Tuesday, November 15, 2005 5:13 PM
Subject: RE: [PIC] How to read Battery voltage with PIC


>
>
> >{Original Message removed}

2005\11\15@121133 by Bob Blick

face picon face
Hi Enrico,

If you are using more than one A/D input, then you have DC input current
as the input capacitor will have the previous channel's voltage on it. So
each time you do a conversion you charge the input capacitor. If you are
not using multiple channels, the capacitor will be close to the last
voltage. You still can have other influences, such as your board layout
injecting clock or other signals into the A/D pin.

Usually for slow signals, decoupling the A/D pin by adding a capacitor to
ground(.01 or .1 as an example) will do everything you need without the
need for such a wasteful resistive divider. Although since you are using a
7805 regulator clearly wasted current is not important.

Hope this helps.

Cheerful regards,

Bob


{Quote hidden}

2005\11\15@124614 by jcantara

picon face
This is a slightly different topic, but one I had run into before:

How would you use a PIC's A/D to measure its own supply voltage?

I had come up with this solution: Use a resistor and a zener diode in series, connected between the supply voltage and ground. The zener would have to have a voltage drop of less than the minimum supply. Measure the voltage drop across the resistor, do some quick math and there you have it.

Anybody else have different ideas on how to accomplish that?

-Jesse

2005\11\15@130254 by Andre Abelian

flavicon
face
Jesse,

using ADC is one way of doing it but PIC has LVD hardware "low voltage
device"
you can use that  it is made for this purpose.

Andre Abelian



jcantaraEraseMEspam.....comcast.net wrote:

{Quote hidden}

2005\11\15@130358 by Mark Rages

face picon face
On 11/15/05, EraseMEjcantaraspamcomcast.net <RemoveMEjcantaraEraseMEspamEraseMEcomcast.net> wrote:
> This is a slightly different topic, but one I had run into before:
>
> How would you use a PIC's A/D to measure its own supply voltage?
>
> I had come up with this solution: Use a resistor and a zener diode in series, connected between the supply voltage and ground. The zener would have to have a voltage drop of less than the minimum supply. Measure the voltage drop across the resistor, do some quick math and there you have it.
>
> Anybody else have different ideas on how to accomplish that?
>
> -Jesse

You've got the right idea.  You need some voltage reference to measure
from.  You are using the Zener as the voltage reference.  (If you
wanted more accuracy, you could use some kind of bandgap reference).  
Then you can measure this constant voltage with the ADC.  With some
math, you can determine the supply voltage based on the ADC count.

Or, you could configure the PIC to use an external reference voltage,
apply the constant voltage to that pin, and use a resistor divider to
measure supply voltage directly on another pin.

Regards,
Mark
markrages@gmail
--
You think that it is a secret, but it never has been one.
 - fortune cookie

2005\11\15@131446 by Bob Axtell

face picon face
Olin Lathrop wrote:

> microsoftwarecontrol wrote:
>
>> But, on my hand, I have plenty of
>> 100k pot and I don't have spare
>> money for "parameter luxury".
>> I did give longer sample time
>> in adc_do();
>
>
> But long sampling time isn't the only problem caused by high source
> impedence.  The leakage current of the A/D input times the impedence
> causes
> an offset that can't be corrected for by increasing the sampling time.
>
>
> ******************************************************************
> Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
> consultant in 2004 program year.  http://www.embedinc.com/products

Dead right.

Better to use a low impedance method (such as switching the input thru a
MC4066). Otherwise the value measured is often 5-10% off true value.

--Bob


--
Note: To protect our network,
attachments must be sent to
RemoveMEattachspam_OUTspamKILLspamengineer.cotse.net .
1-520-777-7606 USA/Canada
http://beam.to/azengineer

2005\11\15@131731 by Peter

picon face

On Tue, 15 Nov 2005, Olin Lathrop wrote:

> microsoftwarecontrol wrote:
>>>> From the database of the PIC you will find, that the input impedance
>>>> of the ADC-pin is 100 kOhms
>>>
>>> Huh?  What "database of the PIC"?  This sounds like nonsense to me.
>>> Site your reference.
>>
>> should be 10Kom?
>
> No, that's even worse.  These are CMOS inputs.  How could Microchip specify
> up to 10Kohms source impedence if the A/D pin itself has a 10Kohm impedence?
> *Think* about it.

Hehe. That's how they convert the MSB ;-)

Peter

2005\11\15@133103 by Mark Rages

face picon face
On 11/15/05, Peter <RemoveMEplpTakeThisOuTspamspamactcom.co.il> wrote:
> >
> > No, that's even worse.  These are CMOS inputs.  How could Microchip specify
> > up to 10Kohms source impedence if the A/D pin itself has a 10Kohm impedence?
> > *Think* about it.
>
> Hehe. That's how they convert the MSB ;-)

Maybe they're trying to avoid reflections ;-)

Regards,
Mark
markrages@gmail
--
You think that it is a secret, but it never has been one.
 - fortune cookie

2005\11\15@135652 by Kenneth Lumia

picon face
I would suggest against this idea.  A zener has a relatively soft knee
voltage
that is dependent on the current flowing through it.  In general you need a
relatively large current to get the voltage to the correct value.  Instead,
use
one of the nicer bandgap references such as a ZRC330 connected to
the positive rail through a resistor.  The reference should be tied to the
VRef+ pin on the ADC;  VRef- goes to ground.  You are then guaranteed
a known voltage/step for the ADC.  Then use a voltage divider as required
to get the supply rail  within the range of VRef+ and ground.  This method
is very accurate - perhaps more than you need.

Note - to save power you could connect the bandgap reference's resistor
to an output pin and only turn the reference on when needed.

Ken
EraseMEklumiaspamspamspamBeGoneadelphia.net

{Original Message removed}

2005\11\15@135746 by olin piclist

face picon face
jcantara@comcast.net wrote:
> I had come up with this solution: Use a resistor and a zener diode in
> series, connected between the supply voltage and ground. The zener
> would have to have a voltage drop of less than the minimum supply.
> Measure the voltage drop across the resistor, do som

Your message got cut off somewhere.  When are people finally going to learn
not to send paragraphs as single long lines!?

Anyway, I've done something similar too.  Zeners at those voltages are not
that accurate, so I used a 2.5V reference because I wanted better accuracy
than what such a zener reference could provide.  In this particular
application the PIC read several voltages including the 2.5V reference.  In
this case I had sufficient cycles so I did a divide for each value to get
the true reading, and compute the Vdd voltage at the same time.

If cycles were more important than complexity, I might use a lookup table
for the 2.5V reading to get a correction factor that can be multiplied by
the other readings.  With reasonable Vdd regulation, you know that the 2.5V
reading can only occur over a small range of the 1024 possible A/D readings,
and the table only needs to cover this worst case range.  64 table entries
gives you +-6% correction range for the combination of the 2.5V reference
voltage and Vdd supply accurracy, with about .2% resolution.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\15@140043 by olin piclist

face picon face
Andre Abelian wrote:
> using ADC is one way of doing it but PIC has LVD hardware "low voltage
> device" you can use that  it is made for this purpose.

I haven't heard of that.  What PICs have this?  What does it do?

You're not thinking of the low voltage brownout detect are you?  Or the
"reference voltage" module that comes with some comparators?  The latter
won't help at all since the reference is in fractions of Vdd, not an
absolute value.  Some PICs do have a bandgap reference which could be
useable, although its voltage is low and therefore the correction will have
low resolution.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\15@143340 by Andre Abelian

flavicon
face
Olin,

I use 18F2520, 18F4520 . PIC has internally generated voltage reference
1.2v and
has LVDIF. You can choose different voltage to cause interrupt I use
this to detect
low battery.

Andre Abelian




Olin Lathrop wrote:

{Quote hidden}

2005\11\15@145010 by olin piclist

face picon face
Andre Abelian wrote:
> I use 18F2520, 18F4520 . PIC has internally generated voltage reference
> 1.2v and
> has LVDIF. You can choose different voltage to cause interrupt I use
> this to detect low battery.

I hadn't noticed this module before.  It does look useful for finding that
the battery voltage is getting low.  While it can give you some information
on the Vdd voltage, it's not very accurate since you can only find out
whether it's above or below 15 preset thresholds.  That's not much use in
correcting a 10 bit A/D reading to the current supply voltage, which is what
the original question was about.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\15@145714 by Andre Abelian

flavicon
face
Olin,

If you are using 3v battery what voltage do you think you should set as
low battery ?

Andre


Olin Lathrop wrote:

{Quote hidden}

2005\11\15@151626 by olin piclist

face picon face
Andre Abelian wrote:
> If you are using 3v battery what voltage do you think you should set as
> low battery ?

That depends on the battery.  See the data sheet.  It also depends on how
much stuff you need to do after you know the battery is low and before it
craps out altogether.  Newer batteries like lithium have a pretty sharp knee
once they start going down.  You don't gain much by trying to pick a point
low on the knee since the vast majority of the capacity has already been
used up by the time it the slope starts heading down.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\15@172257 by Wouter van Ooijen

face picon face
> Now I have learned that most 16Fxxx will have an impedance
> depending on Vdd, mostly 10 kOhms at 5 V Vdd.

I think you are confusing the impedance presented by the PIC A/D input
(which is not a resisitve impedance but at least partially a switched
capacitor) with the maxium impedance of the source which will still
result in the documented A/D accuracy. Personally I don't give a shit
about the impedance of the PIC, uChip specifies what the maximum
impedance of the voltage source is allowed to be and that's what I'll
use for a design. Note that this max impedance is not the same for all
PICs (I recall 10k and 2.5k).

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\11\15@172257 by Wouter van Ooijen

face picon face
> How would you use a PIC's A/D to measure its own supply voltage?

feed it a known voltage (probably from a reference diode or something
like that), A/D this voltage using the Vdd as reference and you have the
inverse of what you asked for. The rest is left as an exercise for the
reader.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\11\15@190025 by Russell McMahon

face
flavicon
face
>> From the database of the PIC ...

> Huh?  What "database of the PIC"?  This sounds like nonsense to me.
> ...

And this reply sounds like the standard "I don't understand that some
people have English as a second language so I'll be rude in response
..." to me.

> Site your reference.

I doubt if the site of the reference is relevant ;-)
He is probably citing a datasheet.

It would indeed be useful for people to give chapter and verse of
where they got their information from, but that's not always obvious
to many until after the event. A gently pointer to this is (arguably)
most useful.

FWIW, the sampling switch resistance RSS of the A2D on a 16F877 is
shown to be about 7 kohm at Vdd = 5 volt for a 16F877 (Figure 11-2,
page 114, DS30292C, 2001). [Varies from 5Kish at 6v to 11Kish at 3v].

Microchip recommend a maximum 10k source resistance. However
(depending on application and precise purpose) it's likely that in
many cases when measuring battery voltage, reduced accuracy due to
high input resistance is acceptable. A resolution of 0.2v in 12 volts
is *about* 6 bits. A few calculations (and/or some simple
measurements) will indicate what sort of accuracy can be expected with
higher than recommended  source input resistances. In this case a 12V
gel cell is specified. Voltage can be expected to (possibly) be
slightly in excess of 14V at end of charge with some chargers
connected, to drop to 12-13v during much of operation and to fall to
about 10 volts towards the end. 6 bits would be usefulish in determing
approximate location along this curve. Varies with load and cell size
etc.


       RM




2005\11\16@044128 by Alan B. Pearce

face picon face
>This is a slightly different topic,
>but one I had run into before:
>
>How would you use a PIC's A/D to
>measure its own supply voltage?

There is a sneaky way to do this.

Set the ADC to use the internal reference (i.e. the PIC supply) as the ADC
reference voltage.

Now have one of the normal input pins connected to a suitable reference
diode, such as one of the 2.5V ones available from many sources.

Now read the ADC channel connected to the reference diode. The resulting
value you get is an inverse ratio between the supply voltage and the
reference diode - i.e. as the supply voltage falls the diode will read a
higher value. You can then use some form of math, probably a table lookup,
or you could calculate it depending on how much spare processor time you
have, to get the true supply voltage value.

There is another trick to this as well, you could use another pin on the pic
to turn the supply to the diode off and on if you need a really miserly
current draw from batteries for example.

2005\11\17@091336 by Maarten Hofman

face picon face
> Microchip recommend a maximum 10k source resistance. However
> (depending on application and precise purpose) it's likely that in
> many cases when measuring battery voltage, reduced accuracy due to
> high input resistance is acceptable. A resolution of 0.2v in 12 volts
> is *about* 6 bits. A few calculations (and/or some simple
> measurements) will indicate what sort of accuracy can be expected with
> higher than recommended  source input resistances. In this case a 12V
> gel cell is specified. Voltage can be expected to (possibly) be
> slightly in excess of 14V at end of charge with some chargers
> connected, to drop to 12-13v during much of operation and to fall to
> about 10 volts towards the end. 6 bits would be usefulish in determing
> approximate location along this curve. Varies with load and cell size
> etc.

During the Microchip battery seminar, that I attended yesterday, they
recommended to always put an OP196 (?) after your voltage divider (for
which they used resistors in the mega ohms). As a reference they
usually used a 7805, but they made sure the PICmicro was callibrated
with a known voltage before using the actual circuit.

They also said to ALWAYS read the battery/cell specification of the
device you're charging, as the voltage behavior varies between types
and manufacturers. All in all I thought it was a pretty useful
seminar.

Greetings,
Maarten Hofman.

2005\11\17@094025 by Mike Hord

picon face
> During the Microchip battery seminar, that I attended yesterday, they
> recommended to always put an OP196 (?) after your voltage divider (for
> which they used resistors in the mega ohms). As a reference they
> usually used a 7805, but they made sure the PICmicro was callibrated
> with a known voltage before using the actual circuit.

I wanted to attend that seminar, but the nearest one is 3 hours away and
I just couldn't swing the trip midweek.

OP196 is a micropower (~60 uA) single opamp by AD.  It seems odd to
me that they'd go to the lengths of using a micropower opamp and
megaohm resistors and then drop a current hog like a 7805 in there.

My most recent method for reading a 9V battery voltage in a micropower
circuit was to use a 2/3 scaling resistor divider (2k/1k), connected to the
battery terminal by an NDS356 PMOSFET.  The gate is connected such
that it is normally pulled high (9V) by a resistor, and then when I want to
check the battery voltage, the gate on the PMOSFET is pulled to ground
through an NMOSFET.  Total leakage current ~1.5 uA when off.  Hard to
beat with any kind of amplifier/divider combo.

It also creates a nice artificial load on the battery, mimicking the load of
the circuit when it's fully operational and not in sleep mode.

Mike H.

2005\11\17@095747 by olin piclist

face picon face
Maarten Hofman wrote:
> During the Microchip battery seminar, that I attended yesterday, they
> recommended to always put an OP196 (?) after your voltage divider (for
> which they used resistors in the mega ohms).

They can say what they want, but that doesn't absolve you from using your
own brain.

They are probably recommending high value resistors as the voltage divider
to minimize wasted battery current in the divider resistors.  In some
applications this can be significant.  Using high value resistors is one
solution, which then requires a buffer amp to lower the impedence driving
the PIC A/D.

There are other solutions too, of course.  The OP mentioned using a 7805
regulator for running the PIC.  This has quiescient current in the mA range.
Let's say the maximum battery voltage you need to measure is 15V, and that
you want the resistor divider output to have 10Kohms impedence.  That means
the top resistor will be 30Kohms and the bottom 15Kohms, and that the wasted
current thru the divider chain at 12V will be 267uA.  If this is only on
when the 7805 is also on and of course other things driven by the 7805 also
on, then it hardly matters.  In that case two resistors is a perfectly
adequate solution that is simpler, significantly cheaper, and takes less
board space than the Microchip solution.  It is therefore most likely a
"better" answer in that case.

There are other solutions like switching on the divider only when needed.
Everything is a tradeoff.  Saying to "always" use a particular method in
this case is just plain irresponsible.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\17@104738 by Maarten Hofman

face picon face
> > During the Microchip battery seminar, that I attended yesterday, they
> > recommended to always put an OP196 (?) after your voltage divider (for
> > which they used resistors in the mega ohms).
>
> They can say what they want, but that doesn't absolve you from using your
> own brain.

You're absolutely right. I was just copying what they said, because I
thought it would be useful information for this list. During the
seminar they seemed to be rather adamant about putting opamps before
internal A/D converters, and most of the audience happily agreed. I
myself would probably never use an opamp, but that is equally bad.

I also have to apologize... They did NOT use a 7805, but instead an
LM3490. However, this doesn't change anything about your useful
comments.

Greetings,
Maarten Hofman.

2005\11\17@122750 by Andre Abelian

flavicon
face
Maarten,

I wouldn't use op amp on car batteries because of it will amplify the noise
so if you are not going to amplify then that is equal to not using op amp.
what's the purpose of using op amp if your input voltage is higher then
what you need?


Andre Abelian



Maarten Hofman wrote:

{Quote hidden}

2005\11\17@124013 by Mark Rages

face picon face
On 11/17/05, Andre Abelian <RemoveMEaabelianKILLspamspamdnfcontrols.com> wrote:
> Maarten,
>
> I wouldn't use op amp on car batteries because of it will amplify the noise
> so if you are not going to amplify then that is equal to not using op amp.
> what's the purpose of using op amp if your input voltage is higher then
> what you need?
>

To reduce the impedance that the ADC sees.

If noise is a problem, use the op-amp to make an active filter.

Regards,
Mark
markrages@gmail
--
You think that it is a secret, but it never has been one.
 - fortune cookie

2005\11\17@124609 by olin piclist

face picon face
Andre Abelian wrote:
> I wouldn't use op amp on car batteries because of it will amplify the
> noise so if you are not going to amplify then that is equal to not
> using op amp. what's the purpose of using op amp if your input voltage
> is higher then what you need?

Opamps are useful for a lot more than just voltage gain.  In this case the
purpose is to reproduce the same voltage with a much lower impedence.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\17@125358 by Spehro Pefhany

picon face
At 11:40 AM 11/17/2005 -0600, you wrote:
>On 11/17/05, Andre Abelian <aabelianSTOPspamspamspam_OUTdnfcontrols.com> wrote:
> > Maarten,
> >
> > I wouldn't use op amp on car batteries because of it will amplify the noise

Not if used properly!

> > so if you are not going to amplify then that is equal to not using op amp.
> > what's the purpose of using op amp if your input voltage is higher then
> > what you need?
> >
>
>To reduce the impedance that the ADC sees.
>
>If noise is a problem, use the op-amp to make an active filter.

Indeed. Or buffer the output of a passive filter. I often do this because
the passive filter is more immune to large transients than something like
a Sallen-Key LPF.

>Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
spamBeGonespeffSTOPspamspamEraseMEinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff


2005\11\17@125902 by Andre Abelian

flavicon
face
Olin,

I know what op amp does all I am saying  is that in this application may
not be
necessary to use op amp because of what's the point of using op amp to
reduce
the voltage if resistor divider does that.

Andre



Olin Lathrop wrote:

{Quote hidden}

2005\11\17@130439 by Andre Abelian

flavicon
face
Mark,

if you do not use op amp then you do not need to add any filter.

Andre



Mark Rages wrote:

{Quote hidden}

2005\11\17@131250 by Mark Rages

face picon face
On 11/17/05, Andre Abelian <EraseMEaabelianspamEraseMEdnfcontrols.com> wrote:
> Olin,
>
> I know what op amp does all I am saying  is that in this application may
> not be
> necessary to use op amp because of what's the point of using op amp to
> reduce
> the voltage if resistor divider does that.
>
> Andre

Andre,

http://en.wikipedia.org/wiki/Impedance

Regards,
Mark
markrages@gmail
--
You think that it is a secret, but it never has been one.
 - fortune cookie

2005\11\17@131311 by Andre Abelian

flavicon
face
Op amp is op amp
the only thing you can do with op amp add filters or control the amplitude
or use as comparator what else can you do with it?
how do you use properly?

Andre


Spehro Pefhany wrote:

{Quote hidden}

2005\11\17@131842 by olin piclist

face picon face
Andre Abelian wrote:
>>> I wouldn't use op amp on car batteries because of it will amplify the
>>> noise so if you are not going to amplify then that is equal to not
>>> using op amp. what's the purpose of using op amp if your input voltage
>>> is higher then what you need?
>>
>> Opamps are useful for a lot more than just voltage gain.  In this case
>> the purpose is to reproduce the same voltage with a much lower
>> impedence.
>
> I know what op amp does

I think you're missing quite a bit about opamps.  Now might be a good time
to go back and re-read information about them.  You've probably picked up
some experience and knowledge and will understand things that didn't make
sense the first time.

> what's the point of using op amp to reduce
> the voltage if resistor divider does that.

This is exactly the question I answered above.  Instead of just asking the
same question again, explain specifically what you don't understand about
"In this case the purpose is to reproduce the same voltage with a much lower
impedence.".


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\17@132256 by olin piclist

face picon face
Andre Abelian wrote:
> if you do not use op amp then you do not need to add any filter.

This is only true if you think the noise is caused by the opamp.  Any noise
present on the battery voltage at the battery will show up proportionally on
the PIC pin without a filter.  This has nothing to do with whether an opamp
is in there or not.  An opamp in the circuit may make it easier to filter
the signal, but of course will also inject a little noise of its own.
However in this case, I don't think the opamp adds significantly to the
noise.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\17@132518 by Bob J

picon face
A voltage-follower (non-inverting amplifier with unity gain) will buffer the
the ADC from the source presenting a low impedance to the ADC. There are
many isolation amplifiers made for this specific purpose, that is to isolate
the measuring circuit from the circuit being measured.

Regards,
Bob

On 11/17/05, Andre Abelian <.....aabelianspam_OUTspamdnfcontrols.com> wrote:
>
> Op amp is op amp
> the only thing you can do with op amp add filters or control the amplitude
> or use as comparator what else can you do with it?
> how do you use properly?
>
> Andre
>

2005\11\17@132540 by olin piclist

face picon face
Andre Abelian wrote:
> the only thing you can do with op amp add filters or control the
> amplitude or use as comparator what else can you do with it?

Lot's.  See my previous two replies to you for one example that you keep
ignoring.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\17@133041 by Maarten Hofman

face picon face
> Op amp is op amp
> the only thing you can do with op amp add filters or control the amplitude
> or use as comparator what else can you do with it?
> how do you use properly?

In the given circuit a LM3480 provides voltage to the PIC. A line from
the voltage that is measured is sent to a resistor pair (in this case
422 KOhm each, but it depends on the voltage you're measuring) which
is fed to the opamp. From there it goes through a 1 KOhm resistor, and
into the A/D converter of the PICmicro.

I agree that it could easily be done with two 5 KOhm resistors as well
(again, depending on the voltage you're measuring), in which case the
opamp would not be necessary. However, if you also want to measure
current, or reduce the power consumed by your measurement, the opamp
should be there.

Greetings,
Maarten Hofman.

2005\11\17@135839 by Wouter van Ooijen

face picon face
>> the only thing you can do with op amp add filters or control the
>> amplitude or use as comparator what else can you do with it?

Everything. With enough opamps you could build a PIC emulator. Or a PC.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\11\17@141029 by Paul Hutchinson

picon face
> -----Original Message-----
> From: TakeThisOuTpiclist-bounces.....spamTakeThisOuTmit.edu On Behalf Of Andre Abelian
> Sent: Thursday, November 17, 2005 1:13 PM
>
> Op amp is op amp the only thing you can do with op amp add
> filters or control the amplitude or use as comparator what
> else can you do with it?

Voltage regulator, current regulator, precision diode, sign changer,
sinusoidal oscillator, multivibrator, sawtooth generator, VCO, to name a
few.

> how do you use properly?

That topic is much to large for an e-mail. I recommend you check some of the
many books on the subject, one of my favorites is the "IC OP-Amp Cookbook"
by Walter G. Jung. Contrary to what the title implies it has a lot of good
theory and the mathematics to back up the examples.

Paul

2005\11\17@142747 by Andre Abelian

flavicon
face
Paul,

I didn't mean what generally you can do with it
I was talking about that specific project only.
I know what op amp can do.

Andre


Paul Hutchinson wrote:

>>{Original Message removed}

2005\11\17@143714 by Marcel Duchamp

picon face
Andre Abelian wrote:
> Op amp is op amp
> the only thing you can do with op amp add filters or control the amplitude
> or use as comparator what else can you do with it?

Op amps can:
convert voltage to current
convert current to voltage
amplify signals
attenuate signals
create signals
perform mathematical operations on signals such as add, subtract,
multiply, divide, integrate, differentiate, extract logarithms,
exponentiate, to name a few
convert impedance levels up or down
simulate inductors or capacitors
filter signals
modulate/demodulate signals
perform many more linear and non-linear functions

> how do you use properly?
See "IC Op Amp Cookbook" by Walt Jung.  Much more than a 'cookbook', it
explains the basics and the not-so-basic op amp theory.  Many example
circuits are shown.

2005\11\17@144826 by Spehro Pefhany

picon face
At 10:13 AM 11/17/2005 -0800, you wrote:
>Op amp is op amp
>the only thing you can do with op amp add filters or control the amplitude
>or use as comparator what else can you do with it?

They are a building block with high gain, and are capable of high precision.
They can be used as a component in virtually *any* analog circuit at
appropriate
frequencies. It's more "what can't you do?".

>how do you use properly?

So that unwanted signals get attenuated, not, as you said "amplified"
(or *rectified* in the case of some high frequency signals). Or unwanted
signals can get into the op-amp output at higher frequencies because the
closed-loop impedance of the output is not necessarily all that low at
higher frequencies. Ignoring obvious textbook stuff like common-mode range,
input and output swing, tempcos, maximum capacitive loading, and so on.
There are many subtleties.

>Andre

With all due respect, I think you should learn a bit more about op-amps
and analog design in general before making dogmatic pronouncements (as
opposed to offering well-intentioned suggestions) on such matters.

For example, if samples contain noise from the vehicle supply and the sample
rate does not exceed the Nyquist frequency for the highest frequency
components of the noise, you cannot possibly filter out the noise digitally,
even if you needed to and had the processor bandwidth to do so. So, going
directly into an ADC from a noisy source with just a low-Z voltage divider
could be problematic.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
TakeThisOuTspeffKILLspamspamspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff


2005\11\17@152223 by Andre Abelian

flavicon
face
Spehro,

thanks for your explanation very useful info but  I was talking about
that particular project just to read a battery voltage op amp may not
be necessary. if filters needed you can add them on resistor divider too
it is better to use with op amp but like I said in some cases may not
needed.

thanks

Andre


Spehro Pefhany wrote:

{Quote hidden}

2005\11\17@191037 by Chen Xiao Fan

face
flavicon
face

>> the only thing you can do with op amp add filters or control the
>> amplitude or use as comparator what else can you do with it?

>Everything. With enough opamps you could build a PIC emulator. Or a PC.
>Wouter van Ooijen

Not a PC, at least a normal PC. A normal PC does have some mechanical
parts which an OpAmp can not emulate. For example, the harddisk,
the casing and the power cord should be very hard to emulate by any
number of Opamps. ;-)

Regards,
Xiaofan

2005\11\17@233638 by Dmitriy Kiryashov

picon face
Hi Andre.

Unity gain amplifier doesn't change the imput voltage
but decreases the source impedance ( dramatically )
is exactly what Olin said. ( high input impedance
low output impedance same voltage )

Cheers,

Dmitriy.


Andre Abelian wrote:
{Quote hidden}

> -

2005\11\17@234054 by Dmitriy Kiryashov

picon face
Hi Andre.

There are two interesting things you can do with op-amp :)
( actually any active amplifier but op-amp is perfect case )

They are called negative feedback and positive feedback :)


Cheers,

Dmitriy.


Andre Abelian wrote:
{Quote hidden}

> -

2005\11\17@234423 by Dmitriy Kiryashov

picon face
Welcome back to good old days of analog computers :)
( with all those drifting headaches attached as a bonus :)


WBR Dmitriy.


Wouter van Ooijen wrote:
>
> >> the only thing you can do with op amp add filters or control the
> >> amplitude or use as comparator what else can you do with it?
>
> Everything. With enough opamps you could build a PIC emulator. Or a PC.
>
> Wouter van Ooijen

2005\11\18@000318 by Dmitriy Kiryashov

picon face
Negative resistance and gyrator.


WBR Dmitriy.



Marcel Duchamp wrote:
{Quote hidden}

2005\11\18@021117 by Wouter van Ooijen

face picon face
>>> the only thing you can do with op amp add filters or control the
>>> amplitude or use as comparator what else can you do with it?
>
> >Everything. With enough opamps you could build a PIC
> emulator. Or a PC.
> >Wouter van Ooijen
>
> Not a PC, at least a normal PC. A normal PC does have some mechanical
> parts which an OpAmp can not emulate. For example, the harddisk,
> the casing and the power cord should be very hard to emulate by any
> number of Opamps. ;-)

One could of course not build a PC that is phyiscally like a PC, but
except for the human interface it could behave like a PC.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\11\18@070256 by Byron A Jeff

face picon face
On Tue, Nov 15, 2005 at 09:36:43AM -0500, Olin Lathrop wrote:
> microsoftwarecontrol wrote:
> >>>From the database of the PIC you will find, that the input impedance
> >>>of the ADC-pin is 100 kOhms
> >>
> >>Huh?  What "database of the PIC"?  This sounds like nonsense to me.
> >>Site your reference.
> >
> >should be 10Kom?
>
> No, that's even worse.  These are CMOS inputs.  How could Microchip specify
> up to 10Kohms source impedence if the A/D pin itself has a 10Kohm impedence?
> *Think* about it.

Presuming this project is one off, is it even worth the thought process?
Use a high value resistor voltage divider with an op-amp follower.

BAJ

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