|
MN
|
 |
« on: March 16, 2009, 08:52:04 PM » |
|
One Wire parasitic mode
I confess not to understand
I have a one wire network - working fine - but about to extend it to another 30 metres and add another 10 DS18B20
The current DS18B20’s I have cut off the power leg and just wired up Data and GND
The usb interface has 2 wires out I connect to the data and GND
If I do not use parasitic mode, and put in a power injector would it just be a case of taking the two wire out of the USB interface, putting into the injector and then running 3 wires out of the injector and wiring all three instead of the 2?
If this is the case. For the new extension would I be right in thinking that I would be better off wiring in all three legs, try in parasitic (I.e. not connecting the power) and IF I get a problem installing a power injector?
Thanks for any help
MN
|
|
|
|
|
Logged
|
|
|
|
|
StBarnabas
|
 |
« Reply #1 on: March 16, 2009, 10:00:37 PM » |
|
I am probably not the best person to answer this but I would definitely wire up all three pins. Wyleu sent me this not so long ago on my "low powered one wire newbie thread"
I'd not use parasitic mode too much. It will go a fair way but it seriously limit the performance, Temp sensors loose resolution or take longer to convert, or don't read as high. Devices like the Ds2940's will work but won't do Ato D conversion.I've had problems with more than six sensors on a line, where sensors appear and disappear at whim, which if some of them are up on the roof is an absolute pain. Just a hint don't forget to bring a connection back from all sensors. It four wires as minimum or six if you do it correctly, but having both sides of a connection available allows network extension and fault finding without problems. Hobbyboard do a power injector which makes the netwrok a lot more rugged. It obviously requires a wall wart to drive it but It's made a lot of difference to the amount of problems and fale triggers I've had on the various one-wire runs around wyleu towers. StB
|
|
|
|
|
Logged
|
 Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
|
|
|
mellifera
Newbie
Offline
Posts: 42
|
 |
« Reply #2 on: March 16, 2009, 10:33:11 PM » |
|
Hi MN, "I have a one wire network - working fine - but about to extend it to another 30 metres and add another 10 DS18B20"You could well run into trouble with this amount of loading on the data line. Maxim do a good technical application note that goes into some detail about 1-wire networks, how they work and parsite power... http://pdfserv.maxim-ic.com/en/an/AN148.pdf"The current DS18B20’s I have cut off the power leg and just wired up Data and GND"The DS18B20 data sheet ( http://datasheets.maxim-ic.com/en/ds/DS18B20.pdf) says that "When the DS18B20 is used in parasite power mode, the VDD pin must be connected to ground." You have obviously got away without doing this so far, but I reckon it will come back to bite you when you extend your network as you say you are going to do. "The usb interface has 2 wires out I connect to the data and GND"I assume you're using something like this...  which has an RJ11 socket, pins 3 and 4 (the middle two) have the Data and Ground connections. Pins 1 and 2 have +5V and 0V which could provide your supply to your sensors without having to buy a power injector. What ever you decide to do, knock it up first and try it out. I got 6 DS18B20s spread over 6m of twisted pair working in parsite power mode running off a USB DS9490R without any problems. Over and above that, I can't say and you're on your own. Good luck and let us know how you get on. Cheers, Mike.
|
|
|
|
|
Logged
|
|
|
|
|
MN
|
 |
« Reply #3 on: March 16, 2009, 10:52:42 PM » |
|
Ah – I have a button starter kit – which has a “DS1402D-DR8 Blue-dot receptor and cable” which I soldered the 2 wires to.
I think what you are saying is scrap the DS1402D and wire in a RJ11 plug and take pin 1 (+5v) to the power pin on the DS18B20s.
Is that right?
|
|
|
|
|
Logged
|
|
|
|
|
wookey
|
 |
« Reply #4 on: March 16, 2009, 10:54:54 PM » |
|
MN, yes that's how you'd do it. Yes, powered is always better. So long as your software does the right things then having both types on a network shouldn't matter, but it's useful to understand that the driving software does entirely different things for parasitic and powered device reading. For powered devices it can check the bus to see if the temp reading has been taken yet (and the device can signal yes/no). For parasitic devices the bus has to be held high until the device has definately finished and no other devices can be talked to during that time (up to 0.75 seconds).
So essentially if the software reads devices simultaneously then it has to treat them all as parasitic if any are parasitic. If it does them one by one then it can treat them as approporiate. It can determine if devices are parasitic or not, but it does have to specifically ask each device. Parasitic will start to fail if any devices have to measure over 100C (e.g. panel sensor).
Personally I can't see the point of parasitic - is it really significantly easier to wire 2 wires than 3 in practice? I'd wire up all three wires, but maybe try just connecting two into the existing bus and see if it works. Any signs of unreliability, then wire up the 5V line too.
|
|
|
|
|
Logged
|
Wookey
|
|
|
|
StBarnabas
|
 |
« Reply #5 on: March 18, 2009, 04:11:29 PM » |
|
Hi Wookey, Meliffera etc
Currently I am using a separate 5V supply. Presemably if using the USB supply you connect the gound and zero together? StB
|
|
|
|
|
Logged
|
 Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
|
|
|
mellifera
Newbie
Offline
Posts: 42
|
 |
« Reply #6 on: March 18, 2009, 06:15:12 PM » |
|
Hi StB, Looking at Maxim's data sheet for the DS9490R there is a circuit diagram on page 5... http://datasheets.maxim-ic.com/en/ds/DS9490-DS9490R.pdfRJ11 pin 1 / Vdd / 5VDC Output - connected to the USB VBUS line via an EMI filter. RJ11 pin 2 / GND / Power ground - connected to the USB GND line via an EMI filter. RJ11 pin 3 / OW / 1-Wire Data - connected to the OW pin of the DS2490 chip via 10 ohms and a DS9503 ESD protector. RJ11 pin 4 / GND_OW / 1-Wire Return - connected to the Pin 2 via the DS9503 ESD protector. If I were you, I'd just use pins 1, 3 & 4 for +5V, Data and Gnd respectively. That way you retain the protection of the DS9503. No guarantees as I have only used parasite power myself, but I've got some bits on order and will be trying USB powered 1-wire networks out. My only worry is noise coming out of the PC on the 5V line, so there might be some need for additional filtering and/or decoupling - hence my "suck it and see" approach. Not sure what physical wiring to use. In my parasite powered network I just use a single twisted pair ripped out from a CAT-5 cable, dirt cheap.  However, with powered networks there are several wiring options to think about... 1) Braid or plait three wires together (life's too sort) 2) Use two pairs ripped out from a CAT-5 (have to keep the pairs together & possible gound loops caused by the two ground wires) 3) Use intact CAT-5 cable and only use 2 out of the 4 pairs (hate this option, such a waste) 4) Use twin core screened co-axial (eg. http://www.maplin.co.uk/Module.aspx?ModuleNo=129 at £0.99/m) Cheers, Mike.
|
|
|
|
|
Logged
|
|
|
|
|
StBarnabas
|
 |
« Reply #7 on: March 19, 2009, 08:53:20 AM » |
|
Mike thanks for that. P.S. you got another applaud from me StB (Sean)
|
|
|
|
|
Logged
|
 Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
|
|
|
|
Paulh_Boats
|
 |
« Reply #8 on: March 19, 2009, 10:02:57 AM » |
|
Mike, Sean,
I think the sensors have a charge pump and regulator built in, so power noise should not be a problem.
However signal reflections, capacitance and noise do ultimately degrade the data line. I found a good article on large 1-Wire networks dealing with these issue - I'll see if I can find it on my old laptop...but the jist of it was a small resistor in the controller output to limit dV/dt and Shottky diodes to clamp negative reflections (however I think the driver chip has slew rate limits built in).
-Paul
|
|
|
|
|
Logged
|
|
|
|
mellifera
Newbie
Offline
Posts: 42
|
 |
« Reply #9 on: March 19, 2009, 11:22:58 AM » |
|
Paul, Okay, the charge pump and regulator will help with noise being injected at the sensor, but I'm concerned with the coupling between the 5V and Data lines. Don't forget they're pretty close and run together for the whole length of the network. I know twisted pairs help but I reckon that the input impedence of the master's data line will be high enough to see it. I'm not saying it will be a show stopper, but it's something to keep an eye on. I can recommend App Note 148 from Maxim ( http://pdfserv.maxim-ic.com/en/an/AN148.pdf) as it covers all this stuff; impedence matching, clamping, loading etc. My components still haven't arrived so am still champing at the bit to try some of this stuff out. [grump] Cheers, Mike.
|
|
|
|
|
Logged
|
|
|
|
|
Paulh_Boats
|
 |
« Reply #10 on: March 19, 2009, 08:01:59 PM » |
|
mellifera,
There is a more detailed paper than your link...just gotta find it. Likewise 150 ohm resistors on each impedance mismatched branch but also clamping diodes I think at the ends of the lines.
-Paul
|
|
|
|
|
Logged
|
|
|
|
winker
Newbie
Offline
Posts: 10
|
 |
« Reply #11 on: March 27, 2009, 09:33:15 PM » |
|
One Wire parasitic mode
.... .... The current DS18B20’s I have cut off the power leg and just wired up Data and GND
....
...cut off the power leg... Even in parasitic mode you need to connect the power to gnd. This is clearly stated in the data sheet. Otherwise I am guessing you may have problems with electrical noise. Also a 4.7K pullup resistor should be used on the data line.
|
|
|
|
|
Logged
|
20x58mm, 160 ltr store (pre heat system), installed 8/11/2008, TDC3 controller, 6ltr total indirect circuit (33% antifreeze mix)
|
|
|
|
MN
|
 |
« Reply #12 on: March 27, 2009, 09:36:23 PM » |
|
I have stopped now  But 10 of them seem to be working fine without it!!!! MN
|
|
|
|
|
Logged
|
|
|
|
|
MN
|
 |
« Reply #13 on: March 29, 2009, 09:43:51 PM » |
|
You could well run into trouble with this amount of loading on the data line.
You were right – adding further runs has given me problems So I wired that power line in Still get errors ERROR From 1Wire Reading 17000001B9944C28 com.dalsemi.onewire.adapter.OneWireIOException: Error during putByte(), echo was incorrect So what suggestions? I use a vb program to read the devices (one at a time) Dim owd2 As com.dalsemi.onewire.container.OneWireContainer28 Dim state As SByte() adapter.beginExclusive(True) owd2 = CType(adapter.getDeviceContainer(strv_ID), com.dalsemi.onewire.container.OneWireContainer28) state = owd2.readDevice owd2.doTemperatureConvert(state) state = owd2.readDevice temp = CDec(owd2.getTemperature(state)) Is that the right way to do it – or is there a better way? (I have no idea what it is doing – just copied the code off the web!) What does Also a 4.7K pullup resistor should be used on the data line. Mean? I could get a power injector http://www.hobby-boards.com/catalog/product_info.php?cPath=25_27&products_id=79Has anyone has one delivered to the uk? Any other ideas? Thanks MN
|
|
|
|
|
Logged
|
|
|
|
|
MN
|
 |
« Reply #14 on: March 30, 2009, 10:09:10 AM » |
|
Last Night it was a random error - now I can't even see the one wire network - 
|
|
|
|
|
Logged
|
|
|
|
|