Searching \ for '[PIC]: AD reading problems 16f877' 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=16F
Search entire site for: 'AD reading problems 16f877'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: AD reading problems 16f877'
2002\08\24@182245 by Fredrik Axtelius

picon face
Hi!

I have a National LM35CZ (Precision Centigrade Temperature Sensor) connected to AN0 of my 16f877.
When looking at the values with my DVM on the output from the LM, everything is stable. Putting a voltage divider pot on AN0 and reading the values, everything is great.

However, putting the LM35 on AN0 and reading make the values kinda "fuzzy".
Normal room temepratur should give me something like 50 from AN0 which is what I get sometimes, the problem is that reading AN0 over and over, the value I get pend from 47 to 55.

I thought the LM35 couldn't devliver enuff ampere so I put a LM324 between it an AN0, same result.

Im a newbie, did I miss anything?

/frax

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


2002\08\24@194833 by Sid Weaver

picon face
In a message dated 08/24/2002 18:24:03 Eastern Daylight Time,
.....fredrik.axteliusKILLspamspam@spam@TELIA.COM writes:


{Quote hidden}

Make sure you have a 1.2K resistor in series with the LM and a .1ufd from the
AD pin to ground.

Sid

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


2002\08\24@200124 by Olin Lathrop

face picon face
>>
I have a National LM35CZ (Precision Centigrade Temperature Sensor) connected
to AN0 of my 16f877.
When looking at the values with my DVM on the output from the LM, everything
is stable. Putting a voltage divider pot on AN0 and reading the values,
everything is great.

However, putting the LM35 on AN0 and reading make the values kinda "fuzzy".
Normal room temepratur should give me something like 50 from AN0 which is
what I get sometimes, the problem is that reading AN0 over and over, the
value I get pend from 47 to 55.

I thought the LM35 couldn't devliver enuff ampere so I put a LM324 between
it an AN0, same result.
<<

Sounds like noise, but it's hard to guess which of the many possible sources
of noise is causing the trouble.  Look at the A/D pin voltage with a scope
to see what the noise looks like.  What does the ground connection from the
sensor back to the PIC look like?  How long is the wire?  What type of
cable, twisted pair, runing along something else?

Fortunately temperature changes slowly, so you can low pass filter the crap
out of it and get rid of most noise that way.  However, it is good to keep
as much noise as possible out of the circuit before getting rid of it with a
filter.  A simple R/C with a 1/2 Hz rollof should do a lot.  I almost always
use software filtering with the A/D too.

Again, you need to start with a clean design.  Actually the noise should be
quite small.  A filter should only be for cleaning up the last little bit,
not for compensating for bad grounding or whatever.


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

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


2002\08\24@200138 by Jinx

face picon face
Your "fuzzy" results sounds like the LM35 is not being loaded. The
app notes for it show a load resistor, anything from 200R to 10k,
and also RC or series R for capacitive loads (eg long cables). It's
got 0R1 impedance at 1mA o/p so it should have enough oomph
for the PIC's AD to read. More info here (303kB)

eehttp://www.eng.ohio-state.edu/~passino/LM35.pdf

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


2002\08\24@223022 by Spehro Pefhany

picon face
At 12:12 AM 8/25/02 +0200, you wrote:
>Hi!
>
>I have a National LM35CZ (Precision Centigrade Temperature Sensor)
>connected to AN0 of my 16f877.
>When looking at the values with my DVM on the output from the LM,
>everything is stable. Putting a voltage divider pot on AN0 and reading the
>values, everything is great.
>
>However, putting the LM35 on AN0 and reading make the values kinda "fuzzy".
>Normal room temepratur should give me something like 50 from AN0 which is
>what I get sometimes, the problem is that reading AN0 over and over, the
>value I get pend from 47 to 55.

If you have more than a couple inches of cable, put a resistor on the output
of the LM35 (or any other similar voltage-output device) BEFORE the CABLE (at
the pin of the device). More than a small number of pF load can cause
stability
issues.  Put some more resistance at the other end of the cable and a small
cap
to analog ground.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffspamspam_OUTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
9/11 United we Stand

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


2002\08\25@142337 by Peter L. Peres

picon face
On Sun, 25 Aug 2002, Fredrik Axtelius wrote:

>Hi!
>
>I have a National LM35CZ (Precision Centigrade Temperature Sensor) connected to AN0 of my 16f877.
>When looking at the values with my DVM on the output from the LM, everything is stable. Putting a voltage divider pot on AN0 and reading the values, everything is great.
>
>However, putting the LM35 on AN0 and reading make the values kinda "fuzzy".
>Normal room temepratur should give me something like 50 from AN0 which is what I get sometimes, the problem is that reading AN0 over and over, the value I get pend from 47 to 55.
>
>I thought the LM35 couldn't devliver enuff ampere so I put a LM324 between it an AN0, same result.
>
>Im a newbie, did I miss anything?
Check your grounds and add a decoupling capacitor across the LM35 pins.
Use a shielded lead if it is longer than ~30cm. You can also make the
LM324 buffer a lowpass by changing the feedback network.

Peter

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


2002\08\25@144646 by Peter L. Peres

picon face
> Check your grounds and add a decoupling capacitor across the LM35 pins.

I meant across the PIC pins where the signal from the LM35 enters.

>Use a shielded lead if it is longer than ~30cm. You can also make the
>LM324 buffer a lowpass by changing the feedback network.

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


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