blazbrajer
Posts: 4
Joined: Tue May 15, 2018 10:20 am

temp sensor ds18b20 problems

Tue May 15, 2018 10:57 am

I have problem with reading sensor and temp. When i connect 20 sensors, i get one or none active sensor. Max sensors then it works is 15.

i use temp sensors ds18b20, the maximum distance from the sensor to the rpi is 10m.

thanks for the help :)

User avatar
Ferdinand
Posts: 236
Joined: Sun Dec 01, 2013 2:24 pm
Location: Leiderdorp, NL

Re: temp sensor ds18b20 problems

Tue May 15, 2018 3:06 pm

Hi blazbrajer,

A good starting point is:
https://www.maximintegrated.com/en/app- ... mvp/id/148
Success with your project!
Ferdinand

User avatar
bensimmo
Posts: 4184
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: temp sensor ds18b20 problems

Tue May 15, 2018 4:01 pm

Is that all off one gpio pin or are you using multiple gpio pins.
You may need to boost voltages for longer distances.

blazbrajer
Posts: 4
Joined: Tue May 15, 2018 10:20 am

Re: temp sensor ds18b20 problems

Thu May 17, 2018 7:17 am

hi bensimmo

all sensor are connected to one gpio
i was thinkig to simulate another w1 pin and devide sensors to 10/10


hi Ferdinand

I found that the problem is in star topology. Tnx for help and article :)

User avatar
bensimmo
Posts: 4184
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: temp sensor ds18b20 problems

Thu May 17, 2018 8:03 am

try adding them to another gpio pin and enabling 1-wire on that.

blazbrajer
Posts: 4
Joined: Tue May 15, 2018 10:20 am

Re: temp sensor ds18b20 problems

Thu May 17, 2018 12:57 pm

do u have any code or script to simulate another w1 on other pin? i was searching all day and i didnt found anything :(

User avatar
B.Goode
Posts: 8898
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: temp sensor ds18b20 problems

Thu May 17, 2018 2:21 pm

blazbrajer wrote:
Thu May 17, 2018 12:57 pm
do u have any code or script to simulate another w1 on other pin? i was searching all day and i didnt found anything :(

At the moment I can't find a definitive answer from the Raspberry Pi Foundation documentation either.

But this link appears to provide the basic details you need to know: https://pinout.xyz/pinout/1_wire

User avatar
bensimmo
Posts: 4184
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: temp sensor ds18b20 problems

Thu May 17, 2018 2:40 pm

Argh just lost my last post :-(

Anyway as above
dtoverlay=w1-gpio,gpiopin=4
dtoverlay=w1-gpio,gpiopin=21
etc
Replacing the current w1-gpio line in /boot/config.txt

There is a longish topic in the depths of the forum that includes when these lines where added, iirc it came about from using a different gpio from default.

blazbrajer
Posts: 4
Joined: Tue May 15, 2018 10:20 am

Re: temp sensor ds18b20 problems

Fri May 18, 2018 6:27 am

thank you all for the help :D :D

Return to “Automation, sensing and robotics”