Page 1 of 1

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

Posted: Tuesday 21 November 2017 14:30
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

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

Posted: Monday 04 December 2017 9:53
by insippo
Try with other resistor. 1K or 2K or 500 ohm.

Sent from my SM-G950F using Tapatalk


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

Posted: Monday 04 December 2017 10:18
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.

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

Posted: Monday 04 December 2017 11:54
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.