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
DS18B20 wire length
-
- Posts: 251
- Joined: 20 Jan 2006 11:17
- Location: Portland UK
DS18B20 wire length
Never underestimate the value of a reply.
-
- Posts: 251
- Joined: 20 Jan 2006 11:17
- Location: Portland UK
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
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
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..
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
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..
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
-
- Posts: 361
- Joined: 14 Dec 2005 20:56
- Location: Slovenia
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
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
Data line is twisted with ground wire ? Wright ?
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
4 x twisted pair
1pair is supply brown + brown/white
blus i/o line
pullup
from brown +5v supply
cap across brown + brown/white
Re: Data line is twisted with ground wire ? Wright ?
Hmmm....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
I don't understand ....
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 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
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro