poor reliability with sensors Dallas DS18B20

I’m working on a project to improve the control of temperature between wood boiler (built in house) - 500 liter tank - solar collector-intercooler from the exhaust of the boiler temperature and other controls that have need of a lot of temperature sensors .The project starts from the lessons learned from differduino by nateful.com
I had to add an electromechanical bypass the wood boiler (inarestabile with fire lit) for frequent failure sensors DS18B20. The system works so incredible solves the problem of hot water and heating a house of 150 square meters with climate of northern Italy
I tried everything found to solve the problem and now I got to the end of my confidence, and I want to try and 2wire i2c sensors LM75 arriving from China in a month.
If anyone has knowledge of these sensors placed parallel on 2wire thank him for the time you’ll want to devote.
Hello

impianto_Martina__MEGA2560__montato.ino (19.7 KB)

In what way do the sensors fail?

Weedpharma

The I2C can go up to 0.5 meters. The 1-Wire bus can go up to many meters.

Do you use shielded cables ? and not near power cables for the boiler ? If the 1-Wire did fail (for example from a voltage spike from the boiler), the temperature should be requested again.

Can you explain what you mean by failure of the sensors ? Do they melt ? What do you use for pullup resistor ? Do you use 3 wires or parasite power ? I think you should fix the 1-Wire bus. I prefer to use 3 wires.

What is the temperature you want to measure? Cooking water under pressure can become above 100C

Koepel: The I2C can go up to 0.5 meters.

Says who.

Bus capacitance is specified. Not wire length. There are 400pf devices and 4000pf devices. 400pf is ~7meters of Cat-6. Leo..

The capacitance of SDA and SCL to ground of 400pF is not the only thing that matters. The crosstalk between SDA and SCL is important as well, so is the value of the pullup resistor and other things that increase or decrease the slope and bouncing of the signal. About 0.5 to 2 meters is normal. And for 200kHz or 400kHz then 2 meters could be too much. Since MauriAlb has so many troubles, it is better to be on the safe side and keep the wires short.

If the 1-Wire causes already so many troubles, would you recommend 7 meters Cat6 cable for I2C ?

Koepel: The capacitance of SDA and SCL to ground of 400pF is not the only thing that matters. The crosstalk between SDA and SCL is important as well, so is the value of the pullup resistor and other things that increase or decrease the slope and bouncing of the signal. About 0.5 to 2 meters is normal. And for 200kHz or 400kHz then 2 meters could be too much. Since MauriAlb has so many troubles, it is better to be on the safe side and keep the wires short.

If the 1-Wire causes already so many troubles, would you recommend 7 meters Cat6 cable for I2C ?

warning OP for the limitations of I2C is not a bad thing, but "The I2C can go up to 0.5 meters" is too extreme. I am running ~7meters of Cat-6 24/7 without any problems between a Mega and to two I2C devices (100Khz). Possible if you do it right, like clock and data on separate pairs, and the right pullup resistors. Leo..

For long haul you can use lower frequency than 100 kHz. 100kHz and 400 kHz are normalised but lower frequency are allowed.

Have a look on last version of Wire library and you can find à non documented function setFrequency().

The sensors OP wants to use are 100Khz/400pf/3mA devices. Buffers might be needed. OP should post a drawing of the setup, with exact wire lengths. Leo..

DS18B20 sensors are reliable, I've had a network of a dozen running for years without any failures.

Sounds like you have cable-bourne noise spikes damaging them. You need to understand how to prevent this or you will simply keep blowing up sensors.

Never run sensor cables parallel to mains wiring if at all possible. That's the single likeliest reason for failure.

Secondly when running long cables you have to protect against interference (for instance nearby lightning strikes - I've been to Italy in the summer - each time a massive thunderstorm - that could be an issue here)

To protect from such damage you have to consider both common-mode and differential-mode noise/interference.

Common mode is both the strongest and easiest to protect against - never ground a cable at both ends, always have the sensor end isolated and add a decoupling capacitor if the cable carries a supply as well as signal. Use twisted pair(s) or screened cable - or screened twisted pair. Have a large ferrite toroid at the Arduino end to kill common-mode currents at radio frequencies (if near an LW or MW radio transmitter you will really need these).

Differential mode is usually low when using screened or twisted cable, but add schottky-diode protection diodes and a series resistor at the receiving to prevent damage from transients (lightning and mains are usually the culprit). Probably a good idea to add schottky diodes at the sensor too, and a zener clamp to stop over-voltage. Once you have a decent armoury of protection components you should be able to endure a lot of abuse.

However consider simply using wireless links instead - often this can be cheaper than the copper in the wires, as RFM23 / nRF24L01+ and similar modules are very cheap these days.

I am happy to see so much information about my problems with ds 18B20. I have to explain: the Arduino board with LCD display and 2 relays for air ventilation on the double boiler steel hood is near the boiler (1 meter with the sensor cable dedicated to the boiler). 3 cables are: 4 meters sensor hall. 1 for sensor 1 for ULN 2003) ascending to the tank under the roof where working with pumps. the cable sensor branches off to the solar collector and the external temperature sensor. All these sensors are powered ground +5 no parasite Power Mode, with resistance at +5 found trying all values to the death. This system works in my daughter's house. she has learned to manage power stops for a few seconds when the alarm 1 0 2 times a month for two years working.

Hi, What temperature levels are you measuring with the sensor unit? What type of sensor construction is it? How are the sensors failing?

Please answer these questions and we may be able to help you. A picture of the installed sensor will help to.

Thanks... Tom.... :)