CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

LM35 sensor affecting the other analog readings. why?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ferkar



Joined: 14 Jul 2007
Posts: 38

View user's profile Send private message

LM35 sensor affecting the other analog readings. why?
PostPosted: Thu Mar 13, 2008 2:35 am     Reply with quote

hi everyone,

after 2 weeks working on my project i could not improve on lm35 problem.

here is my (or pic's) problem.

At analog channels AN0 and AN1 there is a potansiometer(4,7K) and a lm35 sensor. nad i am displaying these data on a LCD.

when i energize the my sysytem i see that lm35 readings floats . and if i turn the potansiometer it affects lm35 readings.

it means analog channels affect each others.

by the way if i remove lm35 and replace it by another pot everything works well.!

so i am so confused ...
Ttelmah
Guest







PostPosted: Thu Mar 13, 2008 3:27 am     Reply with quote

How long are you waiting between changing analog channels?.
The ADC input on the PIC, is effectively a capacitor. This take _time_ to charge to an applied voltage. How long, depends on the impedance of the source, and what voltage was last applied. If you switch too quickly between channels, the last voltage on the capacitor, will affect the new reading...

Best Wishes
ferkar



Joined: 14 Jul 2007
Posts: 38

View user's profile Send private message

a bit more lm35
PostPosted: Thu Mar 13, 2008 5:18 am     Reply with quote

my adc setup: clock_dıv_by_32
waiting between channel selection 100us
Vref+=5V
Vref-=GND

10mV< lm35 output<1500mV
and the main question:
why did i get true results from 2 different potansiometers unlike the results from 1 potonsiometer and lm35?
Question
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Thu Mar 13, 2008 7:31 am     Reply with quote

Can you tell if the LM35 might be oscillating? Make sure you are using the bypass caps recommended in the LM35 data sheet. If it is oscillating at very high frequencies it could cause strange effects.
_________________
The search for better is endless. Instead simply find very good and get the job done.
RLScott



Joined: 10 Jul 2007
Posts: 465

View user's profile Send private message

Re: a bit more lm35
PostPosted: Thu Mar 13, 2008 10:28 am     Reply with quote

ferkar wrote:

why did i get true results from 2 different potansiometers unlike the results from 1 potonsiometer and lm35?


The results depend on the driving impedance of the voltage source. Now the LM35 has very low output impedance, so it should be no problem. But if you have connected it with a resistor in series for some reason, that will degrade the output impedance and require a longer settling time in the A/D converter.

Robert Scott
Real-Time Specialties
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group