It is currently 19 Feb 2019 13:45

All times are UTC + 1 hour




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: DS18B20 wire length
PostPosted: 14 Nov 2007 15:23 
Offline

Joined: 20 Jan 2006 11:17
Posts: 251
Location: Portland UK
Hi, Its me again trying to use a DS18B20 temp sensor.
Does any one know how long the wires can be when using the DS18B20 in VCC mode ( not parasitic mode.)

I can get it to work with about 1m of cable but would like to use 3-4 metres.

Best regards

John

_________________
Never underestimate the value of a reply.


Top
 Profile  
 
 Post subject:
PostPosted: 14 Nov 2007 15:51 
Offline

Joined: 09 Sep 2005 11:34
Posts: 297
Location: belgium
depends of the type of cable but can be 100m easilly
do not use coax

_________________
things we are knowing are always easy


Top
 Profile  
 
 Post subject:
PostPosted: 14 Nov 2007 15:54 
Offline

Joined: 20 Jan 2006 11:17
Posts: 251
Location: Portland UK
The cable I am using is screen twisted pair. using the screen as the gnd.

John

_________________
Never underestimate the value of a reply.


Top
 Profile  
 
 Post subject:
PostPosted: 14 Nov 2007 22:29 
Offline

Joined: 01 Dec 2004 22:29
Posts: 2734
Hi Guys,

I was needing to now the same thing.Thanks.I'm using 4 conductor telephone cable. I asked Maxim IC tech support this question and all I got was "It all depends" and he gave me a link to a app note.Some support. :shock:

_________________
Regards Charlie M.


Top
 Profile  
 
 Post subject:
PostPosted: 15 Nov 2007 08:31 
Offline

Joined: 15 Oct 2007 08:53
Posts: 738
Location: Australia
I have seen a setup where the guy used cat5 cable about 10 meters long.
He had to change the pull-up resistor to 2k2. Also, at that distance, he could only have one device on the bus.


Top
 Profile  
 
 Post subject:
PostPosted: 16 Nov 2007 10:39 
Offline

Joined: 09 Sep 2005 11:34
Posts: 297
Location: belgium
use if possible utp cable tel twisted pair and make a real bus, not a star bus
if you have more than 1 dev
i tested 4 x ds1820 on a cable not used for 230v in // with pwr cable s
about 10m and a star bus goin to 4 radiators accu type
i receive sometime a bad reading (0c) but not critic in my application( just to ctl the charge at the end of the night and see the temp to modif it or not)
i do not use the crc check but exclude the false reading and make a means for 5 times for ex if the application is more critical
i use also ds2408 and ds2540 to ctl a home made alarm and let say every 3h a bad reading so i test it 5 times befor an action...( no crc check)
like that 100% ok

_________________
things we are knowing are always easy


Top
 Profile  
 
 Post subject:
PostPosted: 16 Nov 2007 10:44 
Offline

Joined: 09 Sep 2005 11:34
Posts: 297
Location: belgium
i forget to say that i use 1k tie up res
and i discus before in the forum about cables (also good info on maxim but not always easy to understand for beginners)
rem i use the eeprom of my pic to store some result so i can see what was the value that trigger an even later with the progammer..

_________________
things we are knowing are always easy


Top
 Profile  
 
 Post subject:
PostPosted: 16 Nov 2007 10:47 
Offline

Joined: 09 Sep 2005 11:34
Posts: 297
Location: belgium
i forget to say that i use 1k tie up res
and i discus before in the forum about cables (also good info on maxim but not always easy to understand for beginners)
rem i use the eeprom of my pic to store some result so i can see what was the value that trigger an even later with the progammer..

_________________
things we are knowing are always easy


Top
 Profile  
 
 Post subject:
PostPosted: 16 Nov 2007 10:57 
Offline

Joined: 14 Dec 2005 20:56
Posts: 357
Location: Slovenia
UTP cable is OK. I have 6 DS18S20 connected in LINE in parasite mode. I solved problems of bad reading with few capacitors (1nF) on the LINE. And it works OK.

Best regards


Top
 Profile  
 
 Post subject:
PostPosted: 26 Nov 2007 14:46 
Offline

Joined: 19 Oct 2007 08:15
Posts: 29
Location: Belgium
Same for me, I use UTP, and up to 15 m distance with 1.8k pull up register. I have 6 ds1820 connected to the line. I also use CRC control so far no errors

you have to take care about timings, after the command for calculating the temp you need to wait 750msec before calculation is done.
Also for reading the temperature you need a few msec before the data is ready to receive


Top
 Profile  
 
 Post subject: wow
PostPosted: 27 Nov 2007 20:18 
Offline

Joined: 03 Oct 2007 15:15
Posts: 100
Location: Ireland
used cat5e cable 4 pair
1k pulup at end + 1n non pol cap
50 mtr ds18s20 works fine :idea:


Top
 Profile  
 
 Post subject:
PostPosted: 27 Nov 2007 21:15 
Offline

Joined: 19 Sep 2006 12:57
Posts: 1868
Location: Romania, Arad City
PaulC ,

Data line is twisted with ground wire ? Wright ?

_________________
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro


Top
 Profile  
 
 Post subject:
PostPosted: 29 Nov 2007 10:52 
Offline

Joined: 24 May 2007 15:09
Posts: 497
Might be worth someone putting a scope on it and checking for ringing. I was under the impression that 1-wire could withstand a few N on the pin.

It might benefit from a small series resistor at the PIC I/O pin, at roughly the cable Z.

Also the PIC logic threshold might be a bit low.


Top
 Profile  
 
PostPosted: 01 Dec 2007 16:42 
Offline

Joined: 03 Oct 2007 15:15
Posts: 100
Location: Ireland
Data line is twisted with ground wire ? Wright ?
4 x twisted pair
1pair is supply brown + brown/white
blus i/o line
pullup
from brown +5v supply
cap across brown + brown/white


Top
 Profile  
 
PostPosted: 01 Dec 2007 18:02 
Offline

Joined: 19 Sep 2006 12:57
Posts: 1868
Location: Romania, Arad City
PaulC wrote:
4 x twisted pair
1pair is supply brown + brown/white
blus i/o line
pullup
from brown +5v supply
cap across brown + brown/white


Hmmm....

I don't understand .... :oops:

I use also UTP CAT 5E cable for 1wire bus, but i make few mistakes :

pair white/orange - orange : + 5V
pair white/blue - blue : GND
pair white/green - green : DATA LINE

:?: :!:

I think, the wright choses is : (not tested)

1. wire orange : + 5V (or green or blue or brown .... not mater)
wire white/orange : GND
2. wire green : DATA LINE :arrow: data line twisted with ground
wire white/green : GND
3. wire blue : + 5V
wire white/blue : GND
4. wire brown : + 5V
wire white/brown : GND


Of course pull up resistor from data line to VCC , depend of cable length ( 2k2 - 4k7), and decoupling capacitor 100nF from VCC to GND.

_________________
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


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 post attachments in this forum

Search for:
Jump to: