Searching \ for '[PIC]: Low cost A to D reference' 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: 'Low cost A to D reference'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Low cost A to D reference'
2002\01\10@055445 by NDuckworth

flavicon
face
Hi All,

I have to measure my PIC16C711's own battery supply (2 x AA cells) so need to
generate a reference for the A to D, cost is everything on this one.

I'm tempted to use two diodes in series to ground fed via a resistor from a
port pin so I can enable the reference only when needed, this should produce a
nominal 1.4V reference.
The input volts to the A to D will be divided down from the same port pin so no
current is consumed while the PIC is sleeping.

The project will operated at room temperature so thermal drift should not be an
issue.

Has anyone come unstuck doing this in the past?

Thanks in advance.

Nigel

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


2002\01\10@064801 by Vasile Surducan

flavicon
face
Usual simple diodes can't be used as reference voltage because:
- drop-out voltage depends by diode flowing current
- there is an important temperature variation of about -2...-2.5 mv/C
But if a 1.25V Maxim reference don't satisfy you because of the price, and
you take care about minimum batteries voltage and choose a good current
it might work. You know better how stable must be your reference.

regards, Vasile

On Thu, 10 Jan 2002, Nigel Duckworth wrote:

{Quote hidden}

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


2002\01\10@071417 by J.Feldhaar

flavicon
face
Hi Nigel,

I think a green LED (or yellow) will work better for you, the curve has
a more distinct "bend". A lot of applications use LEDs as Zeners.
If low voltage is a problem, there's always a red one.
Careful: Some ultrabright models can have a very high forward voltage,
just take a lowcost standard LED.

My 0.02 EURO ...

Jochen Feldhaar DH6FAZ

Nigel Duckworth schrieb:
{Quote hidden}

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


2002\01\10@145126 by Roman Black

flavicon
face
Nigel Duckworth wrote:
>
> Hi All,
>
> I have to measure my PIC16C711's own battery supply (2 x AA cells) so need to
> generate a reference for the A to D, cost is everything on this one.

I just took a stab at the "cost is everything"
approach and came up with a 3 resistor one
1N4148 diode and one cap design. It doesn't need
an A to D input, just 3 normal PIC inputs.

* will work on any PIC, even 12-core PICs
* very low parts cost
* can be turned on/off by the PIC
* very low power waste even when turned on
* should give ok accuracy with a lookup table

Unfortunately needs 3 PIC pins total, but you
were already using 2. :o)

Turning a PIC output pin hi activates the circuit
and it starts to draw a tiny amount of power, from
the PIC pin through a 100k resistor into a 1N4148
diode. This resistor lets about 20uA through, which
is the max power draw of the circuit and occurs at
battery=3.4v. At battery =2.4v, a typical low limit,
there is still about 10uA into the diode so diode
current is within the 10uA to 20uA range. Ideal for us,
the diode forward voltage will change very little
on this part of the curve, AND it uses the tinyest
of power. 2 birds. ;o)

This charges a small cap (a low leakage one), up to
the diode forward voltage, through a 56k series resistor.
The cap is connected to a PIC "sense" pin and another
PIC I/O pin through a 10k resistor. These are both set
as inputs and their port data bit is set to low.
Total; 1 diode, 1 cap, 3 resistors, 3 PIC pins

We wait the minimum time for cap to be fully charged,
then the PIC I/O pin with the 10k resistor goes from
hi-impedance input to a hi output.

The sense pin measures the time to go from low to hi,
and this will be determined by the battery voltage so
a simple lookup table will give decent precision to
measure a few battery levels.

To do a battery voltage measurement should not take
much more energy than that needed to charge the cap
once to 5v, and with a small cap (and obviously; high
resistor values) each measurement will only cost a
tiny bit of the battery.

There will be some spread between the Vin hi voltages
of different PICs, giving slightly different readings
from PIC to PIC. But with most products battery level
sensing is only needed in 8 or less levels, to drive
a bar indicator etc. You said minimum cost? This is a
cheap way to do it. :o)
-Roman

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


2002\01\11@082228 by Peter L. Peres

picon face
How about a JFET selected for Vp ~= 2..2.5V and a resistor. You would
switch it by grounding or not grounding the resistor. There are FETs like
this with IDss of 1..3 mA. Just what the doctor prescribed for your
problem ;-).

Peter

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestKILLspamspammitvma.mit.edu


2002\01\11@082234 by Peter L. Peres

picon face
I think that you need a reference anyway. You could use a LM385-2.5
reference diode. It is not stable with temperature however. When you use
the A/D with reference below 3V accuracy suffers afair.

Peter

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


2002\01\11@180033 by Lawrence Lile

flavicon
face
This is ingenious, Roman.
-Lawrence
----- Original Message -----
From: "Roman Black" <RemoveMEfastvidTakeThisOuTspamEZY.NET.AU>
To: <spamBeGonePICLISTspamBeGonespamMITVMA.MIT.EDU>
Sent: Thursday, January 10, 2002 1:44 PM
Subject: Re: [PIC]: Low cost A to D reference


> Nigel Duckworth wrote:
> >
> > Hi All,
> >
> > I have to measure my PIC16C711's own battery supply (2 x AA cells) so
need to
{Quote hidden}

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


2002\01\12@142329 by Dwayne Reid

flavicon
face
At 10:54 AM 1/10/02 +0000, Nigel Duckworth wrote:
>Hi All,
>
>I have to measure my PIC16C711's own battery supply (2 x AA cells) so need to
>generate a reference for the A to D, cost is everything on this one.

What supply voltage does the PIC run from?  Is there a boost convertor to
5V or does the PIC run directly from the battery?

Since this is such a non-precise requirement, I'd be tempted to just use
the logic 1 threshold of a PIC pin - I belive it stays relatively constant
at about 1.4 Vdc regardless of supply voltage.  You would need 1 i/o line,
2 resistors, 1 cap.

100R resistor from PIC pin to 100n cap (other side of cap to gnd), 10K from
battery to same PIC pin.  Turn PIC pin into output and LO, wait a few dozen
cycles until cap is discharged, turn pin into input, time how long it takes
for pin to go HI.  Time is dependant on battery voltage.

Give it a try - should work fine.

dwayne



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

Celebrating 17 years of Engineering Innovation (1984 - 2001)

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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\01\12@212434 by Sean H. Breheny

face picon face
Hi,

Regular PIC inputs are standard CMOS inputs and the threshold DOES change
linearly with supply voltage. The threshold is close to 1/2 Vdd, so if your
Vdd falls by 1 volt, the threshold will fall by 1/2 volt, so it won't work
to use it as a reference. I'm not sure about the Schmitt Trigger inputs,
but I'd suspect that their threshold is highly Vdd dependent, too.

You could use a regular NPN transistor, though, to generate a Vdd
independent means of detecting low supply voltage. Just use a voltage
divider connected to the base of an NPN transistor, with the emitter
grounded and the collector connected to Vdd via a large resistor. When the
battery drops below a given threshold (set by your divider ratio times 0.6
volts), the collector will go high (it will normally be low). You just need
to select the values of the resistors so that the circuit draws very little
current (I think it will work easily with only 1 microamp or so, probably
even considerably less) and to make sure that the amount of current drawn
by the base is much less than the current through the divider.

If you need more than just a yes/no indication, you could buy a small
reference to drive Vref, or again, if you are not concerned about real
accuracy, you could make one using a few 1N4148 diodes and a resistor. You
need to check on how low the ref impedance needs to be (check PIC
datasheet) and you might need to include a transistor in there as a buffer
if it requires a low impedance. Also, since (if I remember correctly) Vref
sets the maximum ADC level, you would have to use a voltage divider to
divide down Vdd a few times before you feed it to the ADC input.

Sean

At 11:47 AM 1/12/02 -0700, you wrote:
{Quote hidden}

----------------------------------------------------
Sign Up for NetZero Platinum Today
Only $9.95 per month!
http://my.netzero.net/s/signup?r=platinum&refcd=PT97

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


2002\01\13@094821 by Roman Black

flavicon
face
Actually, I think Dwayne's suggestion could
be a winner.

Here's the data; (16F628 datasheet)
Input low voltage = 0.15Vdd
Input high voltage = 0.25Vdd+0.8v (for TTL
inputs only, NOT schmitt trigger inputs)

So there is an actual 0.8v diode drop that,
at least according to the datasheet, remains
constant as Vdd changes. Good one Dwayne!

I also think you can leave one of the resistors
out if you use a very small cap, like 47pF.

"PIC measures its battery" circuit:

Bat +
-----------------------------------
(2x 1.5v cells)     |
(2.4v to 3.4v)      |
                   |
             220k  R
                   |
                   |------ (TTL PIC pin)
                   |
                   |
             47pF  C
                   |
                   |
Gnd  ------------------------------------

* pin is OUTPUT, and low (0v)
* pin goes INPUT, (cap starts charging)
* time is measured until cap reaches the
threshold (0.25Vdd+0.8v)
Thanks Dwayne.
-Roman




Sean H. Breheny wrote:
{Quote hidden}

--
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\01\13@143740 by Dwayne Reid

flavicon
face
At 09:21 PM 1/12/02 -0500, Sean H. Breheny wrote:
>Hi,
>
>Regular PIC inputs are standard CMOS inputs and the threshold DOES change
>linearly with supply voltage. The threshold is close to 1/2 Vdd, so if your
>Vdd falls by 1 volt, the threshold will fall by 1/2 volt, so it won't work
>to use it as a reference. I'm not sure about the Schmitt Trigger inputs,
>but I'd suspect that their threshold is highly Vdd dependent, too.

Well, according to one graph, VinH typically varies from about 0.9Vdc
@Vdd=2.5V through about 1.4Vdc @Vdd=5.5Vdc (DS30561B Pg 112).  Thats for a
non-schmitt trigger input.

Because the change in VinH varies less than the change in Vdd, there should
be enough accuracy available to at least give an indication of battery
voltage.  And if he *IS* using a boost convertor to give a regulated Vdd,
there is no problem at all.

dwayne





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

Celebrating 17 years of Engineering Innovation (1984 - 2001)

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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 list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\01\13@205245 by Sean H. Breheny

face picon face
Hi Dwayne,

Hmm, I should have looked at the datasheet myself before talking/typing ;-)
Sorry. They must be making some effort in the design to make it less supply
dependent because, AFAIK, if the input is standard CMOS (just a pair of
mosfets) then it has to vary linearly with Vdd.

Sean

At 07:40 PM 1/12/02 -0700, you wrote:

{Quote hidden}

----------------------------------------------------
Sign Up for NetZero Platinum Today
Only $9.95 per month!
http://my.netzero.net/s/signup?r=platinum&refcd=PT97

--
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\01\14@041250 by Vasile Surducan

flavicon
face
sounds good ! A constant current fet generator running near Z point !
The problem would be matching various fets with various resistors values
for null Id/temperature variation.
regards, Vasile

On Fri, 11 Jan 2002, Peter L. Peres wrote:

{Quote hidden}

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


2002\01\14@045941 by Vasile Surducan

flavicon
face
On Mon, 14 Jan 2002, Roman Black wrote:

> Here's the data; (16F628 datasheet)
> Input low voltage = 0.15Vdd
> Input high voltage = 0.25Vdd+0.8v (for TTL
> inputs only, NOT schmitt trigger inputs)
>
> So there is an actual 0.8v diode drop that,
> at least according to the datasheet, remains
> constant as Vdd changes.

Roman, do you really believe the last sentence ?
[grin]
Vasile

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


2002\01\14@053805 by Jon Baker

flavicon
face
I don't know what you think about this solution for an acurate reference
voltage- but many old  measuring devices which use wheatstone bridges use a
battery ( mercury cell 1.4V.. I can't remember exactly) They last for years
because you're not really drawing much current from it -and their voltage
remains extremely stable over time.

Probably not the ideal solution- but one of the quickest and cheapest.

--
Jon Baker

{Original Message removed}

2002\01\14@054011 by NDuckworth

flavicon
face
Many thanks to those who are contributing to this one.

*Further info*
The project is a hand-held infra-red remote control with a bi-colour LED to
indicate the battery status after each use. My customer has had warranty
problems in the past with similar devices which were mainly due to flat
batteries, hence the need to clearly indicate the battery status. The unit runs
directly from two AA cells.

My initial idea was to use a PIC with an A to D but I like the sound of several
of the alternative suggestions because of the cost saving they could produce.

Thanks again.

Nigel

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


2002\01\14@054858 by Vasile Surducan

flavicon
face
1.410714 V after 10 years of usage, pretty good, yeah !
disadvantage: high gauge, need +25C for acurate voltage, the drawing
current must be in uA range for a stable output.
Also vertical position is required.

Vasile



On Mon, 14 Jan 2002, Jon Baker wrote:

{Quote hidden}

> {Original Message removed}

2002\01\14@112924 by Peter L. Peres

picon face
The Vih of most CMOS circuits is not 1/2Vcc but less than that, because of
the inherent PMOS/NMOS differences. This also happens to make the inputs
TTL compatible.

Peter

--
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 2002 , 2003 only
- Today
- New search...