Searching \ for '[PIC]A2D conversion' 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/ios.htm?key=a2d
Search entire site for: 'A2D conversion'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]A2D conversion'
2006\10\01@122035 by genome

picon face
Hello..
What happens if a PIC pin configured as a 10bit a\d receives negative
voltage... I'm interfacing an lm35c temperature sensor to a pic and it says
on the datasheet that lm35 will produce a negative output voltage when
measuring less than 0 degrees celsius...
thanks..



2006\10\01@124041 by peter green

flavicon
face

> Hello..
> What happens if a PIC pin configured as a 10bit a\d receives negative
> voltage...
that depends on how negative and how low impedance.

from a reading point of view it will probablly bottom out but it may also
start dumping significant current down the pics esd protection diodes
possiblly destroying the pic.

2006\10\01@125927 by Matthew Miller

flavicon
face
On Mon, Oct 02, 2006 at 12:19:41AM +0800, genome wrote:
> Hello..
> What happens if a PIC pin configured as a 10bit a\d receives negative
> voltage... I'm interfacing an lm35c temperature sensor to a pic and it says
> on the datasheet that lm35 will produce a negative output voltage when
> measuring less than 0 degrees celsius...

You can do a few things: don't use the full-range application shown in
figure 2 of the datasheet or using a summing op-amp to add a constant
voltage to the lm35 output. I'm sure there are other solutions.

Take care.

Matthew

--
Have confidence in your decisions. Make them expeditiously, and stay
with them as long as you believe you are correct no matter what others
say. However, when you conclude you were in error, do not hesitate to
announce the error publicly and change course.
  -- Edward J. Koch, former mayor of New York City

2006\10\01@134304 by Harold Hallikainen

face
flavicon
face
Another way of handling bipolar inputs is to just bias them up with a
couple resistors. I don't recall the output resistance of the LM35 chip,
but if it's relatively low, you could just put a couple 10k resistors on
th PIC ADC input pin. The other end of one goes to the reference voltage
(often +5V). The other end of the other resistor goes to the LM35. If the
LM35 were to output -5V, the ADC would see 0V. If the LM35 were to output
0V, the ADC would see +2.5V. If the LM35 were to output +5V, the ADC would
see +5V.

While the absolute values of the resistors is not critical, the matching
(and tempco) IS critical. You are often best off using a couple resistors
on a network, since they are pretty precisely matched in both terms of
initial resistance and tempco.

Harold


{Quote hidden}

> -

2006\10\01@142446 by Wouter van Ooijen
face picon face
> What happens if a PIC pin configured as a 10bit a\d receives negative
> voltage...

then you are operating the PIC outside its specifications. anything
might happen, including cold fusion.

> I'm interfacing an lm35c temperature sensor to a
> pic and it says
> on the datasheet that lm35 will produce a negative output
> voltage when
> measuring less than 0 degrees celsius...

it won't 'produce' a negative output. the trick is to have the gnd of
the lm35 1..2 volt above the PIC ground. read the lm35 datasheet, it is
explained there.

Wouter van Ooijen

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


2006\10\01@160453 by Jinx

face picon face

> What happens if a PIC pin configured as a 10bit a\d receives
> negative voltage

If it's negative enough to turn the internal diode on, either the
pin or the whole PIC can be toasted from latch-up. And that
does happen, trust me

As others have suggested, don't let input voltage go that low

Or if there's a chance it could, protect the PIC with a Schottky
diode ('k' to pin, 'a' to ground) and perhaps even some series
resistance

2006\10\01@235031 by Herbert Graf

flavicon
face
On Mon, 2006-10-02 at 00:19 +0800, genome wrote:
> Hello..
> What happens if a PIC pin configured as a 10bit a\d receives negative
> voltage... I'm interfacing an lm35c temperature sensor to a pic and it says
> on the datasheet that lm35 will produce a negative output voltage when
> measuring less than 0 degrees celsius...

I think you may have misunderstood the datasheet.

The lm35 won't "produce" a negative voltage unless you give it one. Look
at figure two of the datasheet, you need -Vs for the sensor the deliver
the negative voltage.

The lm35 is an OLD part designed at a time when dual supplies were
basically the only thing in the analog world. These days many analog
circuits are single supply, and newer temp sensors have an offset in
their reading to remove the need for the -Vs supply.

If negative temps don't matter to you, connect the LM35 as indicated in
Fig. 1 of the datasheet and you're done.

If you do want negative temps, as it is, you can't read negative
voltages with the PIC. You could connect the GND pin of the PIC to the
-Vs rail, but then you'd have to cobble up a few more supplies to make
the PIC and LM35 happy. I would choose a different sensor then. The LM50
has a built in 500mV offset so that you don't need the negative supply.
I've used that sensor with success.

TTYL

2006\10\02@002828 by Vasile Surducan

face picon face
On 10/1/06, Wouter van Ooijen <spam_OUTwouterTakeThisOuTspamvoti.nl> wrote:
> > What happens if a PIC pin configured as a 10bit a\d receives negative
> > voltage...
>
> then you are operating the PIC outside its specifications. anything
> might happen, including cold fusion.

Wow, some of my colleagues would be extremely happy !
:)
One fact about could fusion which was demonstrated is the
experimentator could influence the experiment just with his believe...

{Quote hidden}

Let say only from the beauty of this topic that indeed will produce
voltage somewhere between  -0.5V...+4.5V range.
In this situation you'll supply the PIC at 0...+5V, tie the -Vref at
-0.5 V and +Vref at +4.5V. All negative voltages connected to PIC must
use limiting resistors (220ohn to 1K). Then the input voltage may
swing between -Vref to +Vref.
The trick used here is that protective diode voltage drop inside PIC
is not 0.3V as datasheet say but around 0.5-0.6V when indeed there is
current flow through those diodes.

Vasile

2006\10\02@163103 by Dwayne Reid

flavicon
face
At 10:59 AM 10/1/2006, Matthew Miller wrote:
>On Mon, Oct 02, 2006 at 12:19:41AM +0800, genome wrote:
> > Hello..
> > What happens if a PIC pin configured as a 10bit a\d receives negative
> > voltage... I'm interfacing an lm35c temperature sensor to a pic
> and it says
> > on the datasheet that lm35 will produce a negative output voltage when
> > measuring less than 0 degrees celsius...
>
>You can do a few things: don't use the full-range application shown in
>figure 2 of the datasheet or using a summing op-amp to add a constant
>voltage to the lm35 output. I'm sure there are other solutions.

Note that the LM35 cannot produce that negative output voltage
without a pull-down resistor to a negative rail.

The easiest way to deal with this is to use a 1.2V shunt regulator in
series with the bottom end of the LM35.  Add a 10K pull-down resistor
to ground.  This gives the situation where 0 degrees C is the value
of the shunt regulator (1.2V).  Temperatures below 0c are less than
1.2V, temperatures higher than 0c are above 1.2V.  Easy to work with.

dwayne

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

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

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