JohnsUPS
Posts: 129
Joined: Fri Jul 06, 2018 2:13 am
Location: USA

Re: DS18B20 Max Distance

Mon Oct 08, 2018 11:10 pm

Just an update to my earlier post about the data center temperature monitor. The monitor has been installed, and everything is working perfectly. I wanted to share some of the installation details, as this installation technique is now proven to work in an electrically noisy environment and should be applicable to many other temperature sensor projects.

The final installation used five sensors spread out along the length of a CAT 6 cable running through the data center. The cable as installed is 369 feet from the first sensor to the DS2482-100 driver chip on the interface board. The first four sensors are spaced about 30 feet apart, and the fifth is about 50 feet from the fourth. Each sensor has a 10uf tantalum SMD capacitor between Vcc and Gnd at the sensor.

All of the sensors are wired in parallel and are NOT being used in parasitic mode. Along the length of the cable run, there were five RJ45 keystones punched down. The RJ45 receptacles in the middle were installed without cutting the wire. About 3-4" section of insulation was carefully removed, then the wires spread out and punched down (I just followed the 568B wiring pattern on the keystone), essentially tapping the cable along its length. Each keystone was then installed into a single port biscuit block and labeled. This took some time, but was worth the effort.

The sensor assemblies consisted of a short piece of CAT 6 cable about ~5" long (could easily be longer) with a RJ45 plug crimped on the end, also following the 568B standard. Modularity makes it easy to replace sensors if necessary, as they just plug right in. Each sensor was wired as follows: org+org/wht connected together and soldered to the VCC pin, blu+blu/wht connected together soldered to the data pin and grn+grn/wht+brn+brn/wht all connected together and soldered to the GND pin. The capacitor was soldered very close to the body of the sensor. Liberal use of heat shrink tubing finished the job. At the monitor box end, the cable pairs were connected together the same way the sensor pigtails were wired.

So, if someone encounters a distance issue (and common category type cable is being used), first check to see what wires are being used and how they are connected. Capacitance on the data line is a bad thing. There is significant capacitance between the twisted pairs, so don't connect the data line to just one side of a twisted pair. Connecting the pairs as I have outlined above by connecting them together will minimize the inter-electrode capacitance (of course feel free to choose your own colors for Vcc, Gnd and Data :D ) Next, what is the voltage swing on the wire? If you are using the common pull-up on GPIO pin technique, don't expect to go hundreds of feet. This is good for code development, but bad for the Pi, as it exposes the pin to the outside world and only has a 3.3v swing. Use a driver chip - not only will your Pi thank you, but you will surely wind up with a much more robust/reliable circuit. Power the chip from 5v and use a level shifter on the I2C. This will get you an almost 5v data swing on the line and will go much farther. Better the chip die than the Pi.
Cheers.....

frankpc
Posts: 7
Joined: Sun Mar 24, 2019 5:06 am

Re: DS18B20 Max Distance

Sun Mar 24, 2019 5:29 am

@JohnsUPS,

Thank you for all your hard work on this and for providing the ideas you have to make it work. I've been battling this myself. Today, I doubled up on conductors per your advice. And it seems things may be working better. I am not using a driver chip, nor am I using a RPi. (yet).

I ended up using a heavier cat5e cable -- 24 awg. I believe I started with 32 awg. I am wondering what you are using.

Also, I am wondering whether cat5 cable is the best way to do this. For example, did you consider using a three-conductor cable of say 22 gauge perhaps even 20 gauge? Most likely cat5 or cat6 is less expensive. Perhaps more resistant to noise. But maybe capacitance would be lower (?) as would the voltage drop with a little heavier gauge non-cat cable.

Did you measure the voltage swings at the end of your cable? I am getting around 4.6 v on the Vcc lead. I haven't measured the data lead. By chance, did you look at the effect the cable length has on the waveform with a scope?

And evidently, you aren't concerned with the effect the delay would have with timing. I suppose since this is a polling system, the delay wouldn't be an issue as long as there are no reflections.

Sorry... I keep coming up with more questions... Did you find that a certain DS18B20 outperformed others?

Thanks again for your helpful write-up documenting your results! I've spent hours researching this subject, and your results are by far superior to any other results I've read about.

Frank

JohnsUPS
Posts: 129
Joined: Fri Jul 06, 2018 2:13 am
Location: USA

Re: DS18B20 Max Distance

Tue Mar 26, 2019 12:40 am

frankpc wrote:
Sun Mar 24, 2019 5:29 am
@JohnsUPS,

Thank you for all your hard work on this and for providing the ideas you have to make it work. I've been battling this myself. Today, I doubled up on conductors per your advice. And it seems things may be working better. I am not using a driver chip, nor am I using a RPi. (yet).

I ended up using a heavier cat5e cable -- 24 awg. I believe I started with 32 awg. I am wondering what you are using.

Also, I am wondering whether cat5 cable is the best way to do this. For example, did you consider using a three-conductor cable of say 22 gauge perhaps even 20 gauge? Most likely cat5 or cat6 is less expensive. Perhaps more resistant to noise. But maybe capacitance would be lower (?) as would the voltage drop with a little heavier gauge non-cat cable.

Did you measure the voltage swings at the end of your cable? I am getting around 4.6 v on the Vcc lead. I haven't measured the data lead. By chance, did you look at the effect the cable length has on the waveform with a scope?

And evidently, you aren't concerned with the effect the delay would have with timing. I suppose since this is a polling system, the delay wouldn't be an issue as long as there are no reflections.

Sorry... I keep coming up with more questions... Did you find that a certain DS18B20 outperformed others?

Thanks again for your helpful write-up documenting your results! I've spent hours researching this subject, and your results are by far superior to any other results I've read about.

Frank

Frank,
Thank you.
For testing and final installation, I used CAT6 cable (CAT5e would also work as well). It is readily available to me in the data center environment, so that is what I used, along with the associated pieces-parts like RJ45 plugs, receptacles and housings. It also worked well with the installation methodology I used. The CAT6 cabling I used was 23AWG - typical. 32AWG is really too small of a gauge in my opinion.

I didn't consider using any other type of wire, although I probably could have had it purchased, but my initial testing was with CAT6, so I just continued to stay the course. I believe that three conductor 22AWG would probably work just fine also (like security system wire), because the inter-electrode capacitance between the data wire and the others will be low. Actually, using security system type wire may be better, because there are no twisted pairs that you have to double up. The overall conductivity of the wire probably isn't as important as the capacitance, so long as the wire isn't too thin. I don't think I'd go 20AWG though - not because it's too thick, but because it would be harder to pull when installing. It is the line reflections that apparently kill a lot of attempts at longer distances. It is one of those things that isn't too apparent or readily diagnosed.

I didn't actually measure the voltage swings, but probably should have. I was satisfied with the sensors working for several days continuously without a hiccup at the end of 470 feet of cable. Any delay significant enough to cause data issues would have exposed itself sooner or later. I was actually surprised to see it working so well. A single hiccup in the data (it was being saved into an RRDtool database) would have told me that things were possibly marginal, but that never happened. The data was solid, so I probably could have used a longer test wire, but a 470 ft spool remnant is what I had laying around. I would have pulled out the scope if there were a problem or indications of instability. Knowing that the final install would probably be less than 470 feet, I was satisfied.

Yes,I did find that some DS18B20's were better than others - I bought some from China (Bangood.com) through two different sellers. I used the non-parasitic type (I didn't even consider the parasitic type). The measurements/calibrations were way off - knock-offs no doubt. I then bought some from Mouser, who certainly sources direct from Maxim/Dallas, and they tracked each other as advertised. Those were the ones that wound up in the data center. I calculated offsets for the others (using the Mouser sensors as my calibration standards), and I'll use them somewhere at some point. Bottom line - spend a bit more and get quality sensors and save the grief.

In another post I have schematic drawings of the sensors and driver chip, and also some photos of the sensor pigtails and construction details. If you have any additional questions, please let me know.


viewtopic.php?f=37&t=231164

frankpc
Posts: 7
Joined: Sun Mar 24, 2019 5:06 am

Re: DS18B20 Max Distance

Thu Mar 28, 2019 9:53 pm

I've reviewed all of your posts on this subject. All of it makes sense. I have one question...

I don't understand how the pi or in my case a CAI webcontrol board, gets the addresses of each sensor initially. In my case, looking back, I realize all of my tests with multiple sensors were conducted with the sensors equidistant from the master. I am wondering whether that caused all the sensors to respond at the same time and clobbered each other. If they were distributed like yours are, perhaps each address could be differentiated from the others.

There is no way to manually enter the sensor addresses in the webcontrol board. Maybe there is in the Rpi or Arduino.

Is it a consideration to distribute the sensors at various distances to allow the initial procurement of addresses? And/or is it standard procedure to manually enter the addresses in a Rpi or Adruino.

Thank you !

User avatar
rpdom
Posts: 15592
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: DS18B20 Max Distance

Fri Mar 29, 2019 5:16 am

The bus protocol the sensors use is designed to prevent two devices accessing the bus at the same time. I haven't checked the protocol recently, but it is documented. Each will take it in turns to respond to the probe. Usually there is something like "Try to assert bus, fail, wait random amount of time, check bus is not in use, try again" loop.

frankpc
Posts: 7
Joined: Sun Mar 24, 2019 5:06 am

Re: DS18B20 Max Distance

Fri Mar 29, 2019 1:55 pm

I haven't found an explanation of the initialization process that occurs when the master hasn't learned what sensors are on the bus. I don't understand where the "randomness" would be created to ensure each sensor has a chance to report its online status and to include its address.

I have tried to get sensors recognized that are the same distance from the master and wasn't able to make that work. With just one sensor, it is recognized easily. So I took that to mean there were conflicts between multiple sensors each trying to respond at the same time. My assumption may be wrong.

If I understood the process, I could better work with it.

Thank you for your expertise!

JohnsUPS
Posts: 129
Joined: Fri Jul 06, 2018 2:13 am
Location: USA

Re: DS18B20 Max Distance

Fri Mar 29, 2019 3:14 pm

Frank
When you state
I have tried to get sensors recognized that are the same distance from the master
, it sounds like you have created a "star" topology, which is something that does not play nicely with the 1-wire protocol. Instead of wiring the sensors back to the same point, connect each subsequent sensor at the terminals (or very close) of the preceding sensor. This way they are still all wired in parallel, but strung out in a line versus all terminating back to a single point. Be sure to also have a small low ESR capacitor across the power leads at each sensor (I used 10ufd/16v tantalum SMD).
If wiring the sensors in a daisy-chain manner is not practical or feasable with your installation, there is an eight channel driver chip (DS2482-800) which would allow eight individual connections back to the board. Becaise the chip is I2C and addressable, multiple chips could be used if your requirement is more than eight.
It sounds like the reflections in the line with your existing topology is what is causing your failure(s).
In my case, I am running OWFS, which takes care of polling the sensors and deals with any bus contention that may happen. In my research when writing the code, I did come across documentation that explained how this contention was handled, but I don't recall exactly. It very well could be handled as rpdom had stated.
I then have some Python code that reads an array that OWFS creates with the sensor values (OWFS seems to populate the array in numerical order per the device ID) and populates the command for submission into an RRDtool database. I am not sure if your board can run OWFS, but if it can, it may make life easier.

danjperron
Posts: 3421
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: DS18B20 Max Distance

Fri Mar 29, 2019 3:22 pm

Yes a small cap at the the power and gnd of each sensor is a good idea. This reduces the spike when the sensor transmit data. The gnd wire is affected and could cause voltage drop.


The best way to check your problem will be with an oscilloscope. This way you could check voltage drop, rise time and any kind of noise on your line. The culprit is normally the Voltage drop and the capacitance of your cable.

To understand the process you will need to understand how the DS18B20 works.

It is pretty well explained on the pdf document from Dallas.

https://datasheets.maximintegrated.com/ ... S18B20.pdf

This is how I made my bitbanging method which is able to read 35 sensors in less than 1 seconds.

https://github.com/danjperron/BitBangingDS18B20

frankpc
Posts: 7
Joined: Sun Mar 24, 2019 5:06 am

Re: DS18B20 Max Distance

Sat Mar 30, 2019 2:16 pm

Thank you for the responses guys. All my multi-sensor tests were done in a star-topology arrangement, which did not work. And the tests were done with a CAI webcontrol board master, which uses integrated firmware. So there is no way to program or customize the master.

I read the Maxim document and found an explanation of the "Search ROM cycle", which runs "as many times as necessary to identify all of the slave devices."

I will connect the sensors to a RPi and run the Python script cited. And position the sensors at various distances from the master. I figure I can coil cable to do that. Do you have a recommended minimum spacing required? I know that JohnsUPS uses around a 20' differential. And danjperron has 35 sensors. What minimum spacing do you recommend?

Thanks for all the great advice!

JohnsUPS
Posts: 129
Joined: Fri Jul 06, 2018 2:13 am
Location: USA

Re: DS18B20 Max Distance

Sat Mar 30, 2019 8:10 pm

You may be able to get away with a star topology if the sensors are on legs of different lengths, but I would not expect the system to be too stable if you can get it to work. Suspect that if it did work, it would still suffer from occasional bad reads.
The distance between sensors that I quoted was the approximate spacing between sensors all strung out in a line. I only have one wire coming back to the Pi (actually back to the driver chip). The spacing was not done to alleviate reflection problems (didn't have reflection problems). I just ran one long wire around the ceiling of the data center and tapped the line wherever I wanted a sensor.

mountbaldy
Posts: 5
Joined: Tue Feb 13, 2018 7:49 pm

Re: DS18B20 Max Distance

Sat Apr 06, 2019 3:50 am

Hi all,

I have been following this thread for quite some time. I have been working on building a solar hot water heater controller. I thought I found a solution until this evening. I ended up buying a 1-wire Add On board for a PiZero to use for the Solar Hot Water Controller. I had it all up and running using a breadboard and when I tried to clean things up and use a longer lead of CAT6 wired into RJ-12 connectors, it failed. When I hook up the CAT6 cable, it kills the Pi...

I have not tried wiring in any capacitors yet. I only really need about 30 feet of cable and I only need 3 sensors total on the entire run. One sensor really close to the pi and two others at the end of the 30 ft run.

Any suggestions are super helpful.

This is the addon board I"m using ....
https://thepihut.com/products/1-wire-pizero

Thanks!

Cheers,

Joe

frankpc
Posts: 7
Joined: Sun Mar 24, 2019 5:06 am

Re: DS18B20 Max Distance

Sat Apr 06, 2019 1:10 pm

I'm definitely not the right guy to answer this question. But, from everything I've read, you can't have two sensors equal-distant from the master. I would like to better understand that. But, it seems the sensor's initial response to the master could be related to the time delay caused by the distance between the sensor and the master. And you can't have multiple sensors responding at precisely the same time during initialization. Seems you have two sensors at the same distance from the master?

Could you extend one of the end ones by say 20' from the other?

JohnsUPS
Posts: 129
Joined: Fri Jul 06, 2018 2:13 am
Location: USA

Re: DS18B20 Max Distance

Sun Apr 07, 2019 3:50 am

mountbaldy wrote: Hi all,

I have been following this thread for quite some time. I have been working on building a solar hot water heater controller. I thought I found a solution until this evening. I ended up buying a 1-wire Add On board for a PiZero to use for the Solar Hot Water Controller. I had it all up and running using a breadboard and when I tried to clean things up and use a longer lead of CAT6 wired into RJ-12 connectors, it failed. When I hook up the CAT6 cable, it kills the Pi...

I have not tried wiring in any capacitors yet. I only really need about 30 feet of cable and I only need 3 sensors total on the entire run. One sensor really close to the pi and two others at the end of the 30 ft run.

Any suggestions are super helpful.

This is the addon board I"m using ....
https://thepihut.com/products/1-wire-pizero

Thanks!

Cheers,

Joe
Joe,
When you say "it kills the Pi", do you mean that the data stops or that the Pi suffers some other fate? The wiring to this add-on board is probably very different than what I did, so be sure to follow the manufacturers suggested pinout of the RJ-12. The bundling of the CAT6 pairs to minimize interelectrode capacitance still applies. You could crimp a short length of wire to the RJ-12 plug (say a foot), and then connect the bundled CAT6 pairs to the appropriate wires because you won't be able to shove all eight CAT6 wires into the RJ-12 plug. All eight wires need to be used. I also noticed that there are two positions on the board for female RJ-12 connectors - just use one, as it looks like they are wired in parallel. Using both will create a two legged star topology - not recommended.
Double-check your wiring - 30 feet should not be a problem.

Yes - add the capacitors. Keep in mind that not only does the driver chip have to drive the line all the way to the sensor, but at some point in time the sensor also has to drive the line all the way back. It is the addition of a capacitor at the sensor that provides the extra bit of power to help the sensor drive a signal back. I used 10ufd 16v tantalum caps. If you use an electrolytic cap, use a slightly larger value, say 22ufd or so (this recommendation is due to the slightly higher ESR of an electrolytic).

Frank,
The 1wire driver chip takes care of any signal contention when multiple sensors are responding. The following isn't a technically perfect description, but it illustrates the problem. Think of signal reflection as an echo (echos are because of mismatched terminating impedances, but I digress). Yell into a canyon, and you'll hear your echo. Now have two people in different locations (hence different distances from the wall that echos the sound) yell the same thing - you probably won't understand the return due to the mix. It isn't that the mix is causing the problem, it is the slight advance or delay in the multiple (unexpected) messages that overlaps the time slot reserved for valid data, hence corruption. The 1wire protocol is very time sensitive. A single echo coming back down the line is expected and dealt with through timing alterations by the driver chip. However, if multiple echo returns are received, odds are these additional echo returns will infringe on the timing margins reserved for valid data, mixing with it the same way the multiple return messages mixed. This corrupts the data that is coming back when it is supposed to and causing grey hairs. :) Excessive capacitance on the data line will also cause a timing shift and result in the same failure as an echo.

danjperron
Posts: 3421
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: DS18B20 Max Distance

Sun Apr 07, 2019 5:43 pm

Maybe I'm a little out of topic but did you consider to use another bus system.

I did make some module using RS-485 using Pic and Arduino board. The RS-485 could be up to 1200 meters in distance and it you will able to send or receive any kind of IOs. Maybe you want to check water tank level, humidity, Light intensity, start some water valve, turn on heater or light,

Granted ! it is a litlle bit more complex but distance and adding all kind of sensors is not a problem.

The thing is that you have already the cat5 cable there. Then one pair for GND, one pair for V+ which could be around 12V and one pair for the data bus. The star layout could be a problem but at 9600 baud it won't be a problem.


Check arduino with modbus. Works very well with minimalmodbus and an usb to RS-845 adapter.

I did post some of my projects. Both are able to handle, DS18B20, DHT11/22,analog sensor, input and output IO.


viewtopic.php?f=44&t=75189&hilit=multi+IO
https://docs.google.com/document/d/1lXs ... sp=sharing

I do have a simple version using a PIC12F1840.

https://docs.google.com/document/d/1Nex ... sp=sharing

I post it just to put some alternative in your mind.

regards,

Daniel

frankpc
Posts: 7
Joined: Sun Mar 24, 2019 5:06 am

Re: DS18B20 Max Distance

Mon Apr 08, 2019 5:31 pm

JohnsUPS wrote:
Sun Apr 07, 2019 3:50 am
The 1wire driver chip takes care of any signal contention when multiple sensors are responding.... and causing grey hairs. :)
First of all, grey hairs are all I have and to get more would be a good thing. :-)

I know from reading your posts of the success you have had that using the 1-wire driver chip is a great idea. My problem right now is I am using a Webcontrol Board, and I think I read that it does not support a driver chip. My board is an older one so it is difficult to know what does and does not apply to it. I will try again to get an answer to that question. The answer is to switch to a Rpi.

I use the Webcontrol board to control my sprinklers. At times we lose power, but when power is reestablished, the webcontrol board has never ended up in a state such that any of its outputs have left a sprinkler on. Do you know whether the Rpi recovers in such a graceful manner? Of course, I could leave the Webcontrol board doing what it does and add a Rpi to the mix.

Thank you for the guidance!

Frank

JohnsUPS
Posts: 129
Joined: Fri Jul 06, 2018 2:13 am
Location: USA

Re: DS18B20 Max Distance

Mon Apr 08, 2019 10:26 pm

Frank,
I'm sure that a Pi could be configured to set the outputs to a known state upon booting up. If the sprinkler valves are solenoid operated, I suspect (correct me if I'm wrong) they would shut off by default upon a power loss.
Also upon booting, you could have the Pi run a routine to take inventory of the states of the sprinklers and set them as you prefer.
Because you have confidence in the Webcontrol board, you could have it command the Pi as need be.

frankpc
Posts: 7
Joined: Sun Mar 24, 2019 5:06 am

Re: DS18B20 Max Distance

Mon Apr 08, 2019 11:47 pm

Thanks. Yes, the valves would turn off if they were on in the event of a power outage. We seldom lose power, but I figure we'll be on vacation, lose power here, then have the sprinklers turn on for a week or so. Glad to hear the pi can be programmed to prevent that.

I'll get a pi hooked up. Thanks for the guidance!

pierred
Posts: 2
Joined: Wed Oct 16, 2019 3:40 pm

Re: DS18B20 Max Distance

Wed Oct 16, 2019 4:21 pm

@JohnsUPS

Hello, first of all let me thank you for your careful post. I'm sure it has provided countless people (like myself) with inspiration on how to extend the scale of their 1-wire designs...

I have a couple of questions:

First, I was quite surprised to see how you are using the CAT6 wire, bundling the two wires of a pair to convey DATA for example. My (very superficial) understanding of twisted pairs is that their main virtue is to reduce noise: if some noise hits the pair, it does so in roughly equal ways on both wires, and is therefore mostly eliminated when taking the difference between the two wires. That's why I've always conveyed Vcc/DATA on a twisted pair. I was curious about the rationale for your wiring of the CAT6 cable?

Second, the Maxim application note Guidelines for Reliable Long Line 1-Wire Networks recommends using a 150Ω resistor at each hub to dampen reflections (although they also say that some drivers, like the DS2480B and DS2484, are adversely affected by that resistor). Is it the case that your driver (DS2482-100 in your note) would also affected by this or not benefit from it?

Thank you,

JohnsUPS
Posts: 129
Joined: Fri Jul 06, 2018 2:13 am
Location: USA

Re: DS18B20 Max Distance

Thu Oct 17, 2019 3:12 am

pierred wrote:
Wed Oct 16, 2019 4:21 pm
@JohnsUPS

Hello, first of all let me thank you for your careful post. I'm sure it has provided countless people (like myself) with inspiration on how to extend the scale of their 1-wire designs...

I have a couple of questions:

First, I was quite surprised to see how you are using the CAT6 wire, bundling the two wires of a pair to convey DATA for example. My (very superficial) understanding of twisted pairs is that their main virtue is to reduce noise: if some noise hits the pair, it does so in roughly equal ways on both wires, and is therefore mostly eliminated when taking the difference between the two wires. That's why I've always conveyed Vcc/DATA on a twisted pair. I was curious about the rationale for your wiring of the CAT6 cable?

Second, the Maxim application note Guidelines for Reliable Long Line 1-Wire Networks recommends using a 150Ω resistor at each hub to dampen reflections (although they also say that some drivers, like the DS2480B and DS2484, are adversely affected by that resistor). Is it the case that your driver (DS2482-100 in your note) would also affected by this or not benefit from it?

Thank you,
The CAT6 wiring for the temp sensors was done that way because the data line for the sensor is what is referred to as a single ended signal - the data signal is referenced to ground (like RS232). Contrast this to Ethernet or RS485, which uses differential signalling - the signal lines are not referred to a single ground, but to each other. The comparisons are between the leads of each twisted pair. If outside noise hits a twisted pair, you're right - the noise would be impressed about equally on each wire. Because the far end is only looking at one of the twisted lines in reference to the other, the noise is not seen and therefore causes no adverse effects. But in this case the far end isn't comparing one of the twisted pair lines to the other, it is looking between one of the lines (DATA) and ground to determine if there is a transition or not.

By putting Vcc and DATA on the same twisted pair, two things are going on. One is that the capacitance on the DATA line is increased (between DATA and Vcc), and because there is capacitance there, any voltage fluctuations on the Vcc line could impress a voltage change on the DATA line. How much of a voltage change depends on the actual capacitance (increasing in this case with increasing wire length) and rate of change of the fluctuation. The Vcc line can fluctuate whenever there is current drawn by the sensors (like when sending data) which is magnified by the resistance of the Vcc wire. Bear in mind that this can go two ways - the voltage changes on the DATA line can impress noise on the Vcc line. This is why DATA was doubled up on one pair (reduced inter-electrode capacitance and resistance), and Vcc on a separate pair. To further reduce the possibility of Vcc fluctuations, I put capacitors at each sensor.
Because the temp sensors utilize a single ended signal referenced to ground, I doubled up on the twisted pairs (four wires) for the ground line to reduce the resistance. It just worked out well that there was a pair left over, and I felt that using it for a better ground (being a single ended signal) was prudent.

I looked at using a small series resistance, but decided against it as the testing I did indicated that it wasn't necessary. Also, the Maxim app note is mainly referring to the parasitic type of temp sensor when referring to the 150 ohm resistors. However, adding this resistor in series with the data line at each sensor for non-parasitic sensors may be something to experiment with if there is problems with data integrity/stability. Take note that although the resistor may dampen data reflections, it also greatly reduces noise immunity.

pierred
Posts: 2
Joined: Wed Oct 16, 2019 3:40 pm

Re: DS18B20 Max Distance

Thu Oct 17, 2019 11:03 am

I see, it makes sense now. Thank you for your thorough response and also, thank you for sharing your knowledge and research on that topic!

Return to “Interfacing (DSI, CSI, I2C, etc.)”