An archive of as of Saturday January 26, 2019.

Problem reading multiple or even 2 - DS18B20


Hi, I made a board to connect all 6 of my sensors. The board works great until I add a 12 foot cord to the sensor. I can do one but not two. With two shorter cords I can read two sensors.

I'm guessing it just doesn't have enough power. I even pulled out 9v 3.5a power adapter to see if that would help and it didn't.

My question is how do I hook up external power to the sensors? I see in the datasheet it can be done but I'm not sure if I just connect the data pin to the Esquilo or do I need to connect both ground and the data pin to the Esquilo.

The external power supply would need to use ground too so that is where I'm not sure if that is the right thing to do. Two power adapter connected to the same ground doesn't seem like a good idea.

I could use the same power adapter and split off a 5v regulator and they would both use the same ground, would that be better than using two power adapters?

Any help would be most appreciated.




How are you wiring your DS18B20's? Are you powering them parasitically over 1-Wire or are you running a separate 3.3V power wire? If you are powering with 1-Wire, then I would recommend wiring a separate 3.3V. In my experience, these sensors are a bit unreliable when powered with 1-Wire, especially when you have more than one.


Hi Scott, I have one wire to ground, one to 3.3v and the data going to Uart tx and rx. A 4.7k between data and 3.3v.

I even tried 5v and still no go.

I've read some people lower the resistor. One guy uses a 5k pot to adjust things to work when he adds more temp sensors. The data sheet says to use a mosfet I think.

Just want to use a good method and not just hack it to work.

Thanks for all your help, let me know what you think is the best way.



From what I read the MOSFET can be a bit complicated and doesn't allow others to talk while using it so they recommend the external power supply as the best and simplest method.

I'm just not 100% sure how to do that and don't want to burn out my temp sensors nor the Esquilo. They cost too much.

I have these temp sensor that hopefully will stand up to the chemical Is will be using.

By hack I was meaning the resister or 5k pot thing.

Thanks a lot for your help Scott,



I've not used 1-wire over longer distances. I assume you've seen this?

If it were me, I would first try lowering the pull-up resistor a bit to 2.2K or 1K. Failing that, I would probably try the RC filter next. See Appendix C in the link above. The MOSFET design seems pretty heavy-handed to me.

The 3.3V power on Esquilo should be plenty stable enough to power the devices. I would suggest adding some decoupling capacitors between power and ground pins on each DS18B20. Something along the lines of 100nF (0.1uF).


Thanks Scott, I was wrong about the resister being a hack then.

Thanks for the link, I had not seen that. It was very interesting. I'll have to read it a couple times to get a better understanding. Though I'm not using twisted pair too but stereo head phone extensions. 12' is probably the longest run depending on where I can put the box.

I'll give the resisters a try and put in the caps and see what happens. I'll probably work on cutting down the cable length when not needed. They were a good deal on Amazon and I thought having them all the same length would be better for it with impedance and all that but maybe I'm wrong about that too.

Thanks for your help Scott, hope you have a great day!



Just an update. I think I finally have it working good with all 6 sensors.

I tried everything you mentioned Scott and I was able to get one or two more sensors to work. I tried the RC that the link talked about and maybe some thing else, still didn't want to work.

Also from that link it said to stay away from Star topology. That is how mine is setup though I'm not going the distance that they talk about. I was dreading having to change it and they said to use cat5 cable, I'm using stereo cables, just made things easier to connect.

Well I finally ended up giving the sensors their own power. I am using a small bread board that you can solder on, which all my sensor wires go to. I ran my 9v supply to the board and put in a 5 volt regulator. Connected a power cable to the same place as the 9v input on the board and plugged it into the Esquilo. Ran the 5v line to the positive wires on the sensors, the negative to the negative wires on the sensors. Put a 4.7k resister between 5v and the data lines for the sensors. At first it didn't work with all of them hooked up but then used a lower 2.2k resister Scott suggested and everything is working now.

Using the one 9v transformer for both has given me a common ground so I don't have to worry about that if I had two different transformers supplying power.

Hopefully it will continue to work when I set this up on our Anodizing line to monitor temperatures of the tanks.

If I have to build one again I'll use the cat5 and the configuration that they say to use in the link Scott provided.

It would have been nice of them to mention this in the data sheet for the sensors, I probably wouldn't have had to go through all this.

I think my up down buttons are working for my 4 line lcd though it is a bit slow. Have some minor changes to try and speed it up and make it move more fluid rather than clearing the screen and writing the next 4 sensors to the screen.

Now have to get my web interface updated for all 6 sensors and I will be good to go I hope.

Thanks Scott for all your help.



Not a problem. I'm glad you got it working.