I am planning on running a bunch of DS18S20+ temp thermometers and the instructions here http://forums.fungizmos.com/viewtopic.php?f=6&t=2 say to use a 4.7k ohm resistor. Is this 1/2 watt one sufficient? http://www.allelectronics.com/make-a-store/item/293-4.7K/4.7K-OHM-1/2-WATT/1.html How can you tell how many watts a resistor needs to be? Thanks for the help!
If that would be a resistor for each node, then that's overkill.
The general formula is: P=U*I (power = voltage * current). If i recall correct then the max. current of the ds18b20 is about 10 mA, so at 5 volts you would need: P =5 * 10e-3 = 0,05 W.
But if you are using it for an entire chain of DS'es then you do the math
what kind of cable do you suggest for a 1-wire network? especially if it's fitted inside an existing electrical system. How long can it be?
I was wondering about coaxial cable used for satellite antennas....
What about DS18B20? It's supposed to have 0.0625°C precision right?
I know several people that run their low dc stuff through cat5 cable. I am planning to run mine with telephone wire that has 6 wires inside it. I don't really need many wires since I can have a lot of sensors using the single bus. I don't think distance is too much of a problem with the 1-wire sensors so long as it is not enormous. I plan to run mine the length of the house from my computer to my heating system.
I got my sample thermometers from Maxim the other day. They sent two completely free! They are smaller than I thought they would be. I can't wait for my Arduino usb board and other parts to come in the mail so I can get started experimenting!
If you are using 1-wire, you theoretically don't need power. Some of the devices can operate in parasitic power mode, so that they charge an internal capacitor and use that power to communicate over the same wire they're powered from. That's where they get the name "1 wire".
I think the temp sensors I messed with were rated 100m for parasitic power mode? Check the datasheet, you may be pleasantly surprised. Phone wire - even existing, unused phone wire - may do the trick.
-j
"Phone wire - even existing, unused phone wire - may do the trick."
While most phone wiring in most homes have spare pairs avalible, I would suspect trouble trying to use it for one wire due to capacitivly coupled interference when an in service pair carrying normal phone service receives a ring signal which is 90vac 20hz.
I was thinking more of an unused phone line, not an unused pair on a line that's in use. I've never been a fan of randomly sharing cables for just the sort of reasons you mention.
-j
You can have your sensors be about 200 yards or 600ft ( about 182m ) away from the unit but your voltage can't drop below 4.4VDC, if it does you will have problems
You might be able to increase the range a bit by putting 10uf tantalum capacitors across the power pins on each DS18S20
The caps are also supposed to reduce random errors
thank you for all the replies about 1-wire distance and wires
seems i'll give a try to telephone cable, since it's cheap and have a small section. Plus the telephone tubes of the electrical system are almost empty.
But retrolefty pointed about ring signal interference. Is it better to use a shielded twisted pair?
Can one arduino board manage multiple 1-wire networks? If I understood correctly they just use one digital output... but maybe the library can't.
Whatever you decide to do make sure you use a dedicated cable for this that is very clearly marked!
If you take some pairs from existing cables it is very likely someone may try to use the same cable for something else and you could end up frying your devices and possibly starting a fire
Phones use about 48VDC, while the arduino and DS18S20s use 5VDC, if you accidentally mix the two you will have major problems
So make sure everything is properly marked so no one gets them mixed up
Can one arduino board manage multiple 1-wire networks? If I understood correctly they just use one digital output... but maybe the library can't.
Hardware-wise you can have separate 1-Wire networks on each digital pin, since we're bit-banging it anyway. I don't know what the software library will support, though.
-j