DS18b20 and long wire : how to set up a switched star network ?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Mathieu
Posts: 1
Joined: Tuesday 21 November 2017 14:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

DS18b20 and long wire : how to set up a switched star network ?

Post by Mathieu »

Hi there !

I'm not sure where to post, sorry ...

I have a problem quite simple, but the solution is not that easy : I have to monitor a historical wooden building in Northern Norway by avoiding the sprinkler system to freeze. This building is on four level and almost 2000 sqm each.

I already set up up to five ds18b20 by using the 1wire protocol, and adjusting the value of the resistance to 470 ohm in order work. I have a star network which is the easiest for me to connect all this (old fire alarm system, but quite new wires) each branch is ~40-70m

When I add a 6th ds18b20 sensor, I can still read the values, but after a while, all the sensors are down and domoticz keeps the oldest value. In the log :

Code: Select all

 Error: 1-Wire system : error reading value from /sys/bus/w1/devices/28-0000
I don't know how to solve this problem, knowing that I would like to have ~25 sensors in all the building.

Does anyone know how to set up a "switched star network" ? It seems it is the only way to solve my roblem and I don't find any topic to do it :/
https://www.maximintegrated.com/en/app- ... mvp/id/148

Does writing a diferent hardware line for each ds18b20 might help ?

If changing for a linear network will work for one floor (less than 200m), it will not work for the 4 floors anyway :/

Thanks for any help, I'm desperate
insippo
Posts: 41
Joined: Sunday 26 June 2016 20:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DS18b20 and long wire : how to set up a switched star network ?

Post by insippo »

Try with other resistor. 1K or 2K or 500 ohm.

Sent from my SM-G950F using Tapatalk

User avatar
bbqkees
Posts: 407
Joined: Sunday 17 August 2014 21:01
Target OS: Linux
Domoticz version: 4.1x
Location: The Netherlands
Contact:

Re: DS18b20 and long wire : how to set up a switched star network ?

Post by bbqkees »

If you use the DS18B20 with a Pi, the power voltage for the sensors is 3.3V.
If you use an Arduino instead, you use 5V to power the sensors.
This will likely give some more breathing room.

If you want to make a switched start network, this can't be done directly in Domoticz.
You would need to add transistors and software switching logic.

I would say use one Arduino per floor and let each Arduino send the data to the Pi via MQTT/HTTP GET.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
Toulon7559
Posts: 853
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DS18b20 and long wire : how to set up a switched star network ?

Post by Toulon7559 »

IMHO, DS18B20 operates best in a chain/bus configuration, not a star-configuration: see the datasheet.
'Star' can be done, but it is not according to design.

Perhaps for your application it is an option to make a chain per floor with a related processor per floor (like bbqkees suggests), and then link those processors per floor to a 'master'-processor. Or multiple chains&processors, each guarding a sector.
Candidate processors: ESP8266, Arduino and Raspberry, which all 3 have configurations which can feed to a central processor with Domoticz.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest