What is the differ ?

General discussion on mikroPascal.
Post Reply
Author
Message
nafezfares
Posts: 60
Joined: 27 Feb 2009 18:39

What is the differ ?

#1 Post by nafezfares » 09 Jul 2009 04:36

Hi every body,

Iam using pascal compiler for PIC4 .
My questiones : -

1-What are the main differences between LM35 and DS1820 ( temperature sensors ) ? :?:

2- For LM35 ....every 10mv = 1c
but howmuch for DS1820? :(

3- Why they said, it is a digital sensor (DS1820) while they connect it A0 ( analog to digital channel ) ? like LM35 is connected to A/D Channel . :o

Iam looking forward to hear from any body. :idea:

W B R
Nafez

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

#2 Post by janni » 09 Jul 2009 21:44

DS1820 is a digital sensor communicating over so-called one-wire interface. mP has OW (one-wire) library and there are code examples to be found on the forum.

A0 is not purely analog - it may be cofigured as digital I/O, as well.

nafezfares
Posts: 60
Joined: 27 Feb 2009 18:39

#3 Post by nafezfares » 10 Jul 2009 04:27

Hi janni,

Thanks alot for your reply ,

This means that sensor ( DS1820 ) has converter inside , which in turn converted the analoge signal to digital , Is this true? :idea:

regards
Nafez

joseLB
Posts: 444
Joined: 02 Apr 2006 05:56
Location: Riode Janeiro, Brasil

#4 Post by joseLB » 16 Jul 2009 19:54

nafezfares wrote:...This means that sensor ( DS1820 ) has converter inside , which in turn converted the analoge signal to digital , Is this true?....
Exactly that. But that not mean that using DS1820 is simpler than use of lm35... :D
see this: http://www.mikroe.com/forum/viewtopic.p ... light=lm35

nafezfares
Posts: 60
Joined: 27 Feb 2009 18:39

#5 Post by nafezfares » 17 Jul 2009 08:25

Great Job joseLB>>>>>>>>>>>>>>>
THANKSSSSSSSSSSSS :)

nafezfares
Posts: 60
Joined: 27 Feb 2009 18:39

#6 Post by nafezfares » 14 Aug 2009 22:51

Hi every body, :arrow:

I get the temperature reading on LCD by using LM35.
But it is not stable ( changed every second from 23 to 24 to 25 , 23, 24, 25 and so on ). :(

I tried to put an electolyte capcitance ( 10 micro farad ) on the output of the lm = (enterance of the PIC ).
It becomes stable but not practical values. :cry:

Please who can advise ? as much as can . :?:

wIth Best Regards
Nafez

joseLB
Posts: 444
Joined: 02 Apr 2006 05:56
Location: Riode Janeiro, Brasil

#7 Post by joseLB » 15 Aug 2009 00:46

[quote="nafezfares]...But it is not stable ( changed every second from 23 to 24 to 25 , 23, 24, 25 and so on[/quote]Hi, I could suggest
  • xxx
    xxx
    xxx

joseLB
Posts: 444
Joined: 02 Apr 2006 05:56
Location: Riode Janeiro, Brasil

#8 Post by joseLB » 15 Aug 2009 00:54

nafezfares wrote:...But it is not stable ( changed every second from 23 to 24 to 25 , 23, 24, 25 and so on
Hi, I could suggest
  • 1- try to put a 100kpf cap at the +- of LM at the board
    2- try to put a 100Kpf cap betwen the +- of PIC (at the +- pins preferably)and the same at the LDC.
    3- remember that 23-> 25v = 0.02 change! If you are using as ADC vref the 5v PIC, your are converting very near the low end of the range. Better would ber to have an smaller verf.
    4- i'm not recomending to use a LED as vref - 1.62 -> 1.67 v, (as it's lower than minimum 2.5v recomended at manual), BUT I use it a lot and never had a problem. I use leds as they are very voltage stable unde current changes (much better than zenners at low currents).
    5- if you are using an external vref, put the 100kpf caps on them.
good luck
Jose

joseLB
Posts: 444
Joined: 02 Apr 2006 05:56
Location: Riode Janeiro, Brasil

#9 Post by joseLB » 15 Aug 2009 00:56

===> important: try to use a shielded cable from board to LM, first connecting the shield to LM and later to board.

nafezfares
Posts: 60
Joined: 27 Feb 2009 18:39

#10 Post by nafezfares » 16 Aug 2009 00:53

DEAR joseLB,
Thanks for your reply. :D

[/quote]Hi, I could suggest
  • 1- try to put a 100kpf cap at the +- of LM at the board
    >>> 100Kpf = 0.1pf :?:

    3- remember that 23-> 25v = 0.02 change! If you are using as ADC vref the 5v PIC, your are converting very near the low end of the range. Better would ber to have an smaller verf.
    >>>Yes I use 5V as V ref, I will try to use 3.3 V :idea:

    4- i'm not recomending to use a LED as vref - 1.62 -> 1.67 v, (as it's lower than minimum 2.5v recomended at manual), BUT I use it a lot and never had a problem. I use leds as they are very voltage stable unde current changes (much better than zenners at low currents).
    >>>Iam new in this field , and can't understand this idea, so please post to me the circuit diagram to build it , may be it easy for me. :?:

    5- if you are using an external vref, put the 100kpf caps on them.
>>> I already using the same 5V to all the circuit. :!:

W. B.R
Nafez

nafezfares
Posts: 60
Joined: 27 Feb 2009 18:39

#11 Post by nafezfares » 16 Aug 2009 01:00

Dear Jose,
thankssssssssssssss :D
joseLB wrote:===> important: try to use a shielded cable from board to LM, first connecting the shield to LM and later to board.
[color=blue]>>>I am already using a shielded cable from LM to the PIC board,
copper wire covered by plastic , is it ok ?[/color]


W.B.R
Nafez

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#12 Post by Dany » 16 Aug 2009 09:07

Hi, I could suggest
  • 1- try to put a 100kpf cap at the +- of LM at the board
    >>> 100Kpf = 0.1pf :?:
Normally the value 100nF is used, and not the double prefix unit 100KpF.
100 KpF = 100000 pF = 100 nF.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

joseLB
Posts: 444
Joined: 02 Apr 2006 05:56
Location: Riode Janeiro, Brasil

#13 Post by joseLB » 16 Aug 2009 13:58

Thanks dany, 100nF :oops:
Hi Nef: start putting the 100nF at the +- pic's pins. Decoupling sometimes does miracles....
and connect the shield first at board and later at LM. By the way, as smaller the wire, the better.
Take a look at this manual, what it suggests for noise reduction (page 6 of pdf). http://www.national.com/ds/LM/LM35.pdf
LED as vref

Code: Select all

+5 <------+
          |
         [ ] 1KR
          |
          +------> PIC Vref
          |
          _
          V   led
          | 
          _
         ///
good luck
Jose

nafezfares
Posts: 60
Joined: 27 Feb 2009 18:39

#14 Post by nafezfares » 17 Aug 2009 00:21

100 KpF = 100000 pF = 100 nF.[/quote]
>>> thanksssssssssss alot :D

WBR
Nafez

nafezfares
Posts: 60
Joined: 27 Feb 2009 18:39

#15 Post by nafezfares » 17 Aug 2009 00:41

[quote="joseLB"]Thanks dany, 100nF :oops:
Hi Nef: start putting the 100nF at the +- pic's pins. Decoupling sometimes does miracles....
[b]
>>>Thanks alot Jose for declearation with Dany, yes sometimes happened
.[/b] :D

and connect the shield first at board and later at LM. By the way, as smaller the wire, the better.
Take a look at this manual, what it suggests for noise reduction (page 6 of pdf). http://www.national.com/ds/LM/LM35.pdf
[b]
>>>This need alot of work .
Can you please send apicture (THE WAY OF SHIELDED ) for me even from the internet, to start apply like it. [/b]
:?:

LED as vref

>>>> Also Iam v. happy with 3.3 Vref .
:D

W.B.R
Nafez

Post Reply

Return to “mikroPascal General”