Device Temperature DS18B20 from flipping from 9 to 12bit
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 7
- Joined: 04 Oct 2017, 18:41
Device Temperature DS18B20 from flipping from 9 to 12bit
I have 2 DS18B20 connected to an esp8266. I´am using esp easy v2.0.0-dev11.
I have added 2 devices with Temperature - DS18b20. I put the resolution on 9 bits. The devices are working fine.
But after a while (can be one hour or shorter or longer) the devices are giving a reading of 85.00. When I look into the device config, the resolution is changed from 9 to 12 bit.
Is this normal ?
Can I prevent this behaviour?
I have added 2 devices with Temperature - DS18b20. I put the resolution on 9 bits. The devices are working fine.
But after a while (can be one hour or shorter or longer) the devices are giving a reading of 85.00. When I look into the device config, the resolution is changed from 9 to 12 bit.
Is this normal ?
Can I prevent this behaviour?
-
- Core team member
- Posts: 9903
- Joined: 01 Sep 2017, 22:13
- Location: the Netherlands
Re: Device Temperature DS18B20 from flipping from 9 to 12bit
I have no personal experience with these Dallas sensors.
Does it also happen when only one sensor is being used?
The function to set the resolution is only being called when the device is being saved via the web interface.
The code suggests the resolution is being stored in the flash on the sensor itself. So it should only being changed when using the web interface.
So maybe there is some bug when using more than one of these sensors and just looking around in the device tab of ESPeasy?
Try to stay away from the web interface and just let it run to see if it keeps working longer.
Does it also happen when only one sensor is being used?
The function to set the resolution is only being called when the device is being saved via the web interface.
The code suggests the resolution is being stored in the flash on the sensor itself. So it should only being changed when using the web interface.
So maybe there is some bug when using more than one of these sensors and just looking around in the device tab of ESPeasy?
Try to stay away from the web interface and just let it run to see if it keeps working longer.
-
- New user
- Posts: 7
- Joined: 04 Oct 2017, 18:41
Re: Device Temperature DS18B20 from flipping from 9 to 12bit
I will try with 1 sensor.
I'am not using the the web interface.
I'am not using the the web interface.
-
- Normal user
- Posts: 1156
- Joined: 03 Sep 2016, 23:27
- Location: Bielefeld / Germany
Re: Device Temperature DS18B20 from flipping from 9 to 12bit
Hello,
just tested:
Dev11 on a neodeMCU with 3 x DS18B20 on a q&d breaboard circuit.
Running now for 4,5 hours without any issue.
Are you sure that's a firmware problem?
Possibly it might be a problem of pull up or of power supply.
Regards
Shardan
just tested:
Dev11 on a neodeMCU with 3 x DS18B20 on a q&d breaboard circuit.
Running now for 4,5 hours without any issue.
Are you sure that's a firmware problem?
Possibly it might be a problem of pull up or of power supply.
Regards
Shardan
Regards
Shardan
Shardan
-
- Normal user
- Posts: 1156
- Joined: 03 Sep 2016, 23:27
- Location: Bielefeld / Germany
Re: Device Temperature DS18B20 from flipping from 9 to 12bit
I've changed the settings now to get reporting to my home control server and will let it run
for a while - it's up for 120 minutes now and running flawlessly.
Regards
Shardan
for a while - it's up for 120 minutes now and running flawlessly.
Regards
Shardan
Regards
Shardan
Shardan
-
- New user
- Posts: 7
- Joined: 04 Oct 2017, 18:41
Re: Device Temperature DS18B20 from flipping from 9 to 12bit
I'am running it now with 1 sensor for a while also with no problem. Sensor is also working on 12bit.
-
- Normal user
- Posts: 1156
- Joined: 03 Sep 2016, 23:27
- Location: Bielefeld / Germany
Re: Device Temperature DS18B20 from flipping from 9 to 12bit
As said this might be a problem of the pullup resistors or a noisy power supply.
Another possible thing is a faulty cable somewhere in the circuit.
Check the cabling first.
Use an external pullup resistor with 4.7KOhm.
Maybe try a capacitor of about 100µF at the end of the cables
between Vcc and Gnd.
Regards
Shardan
Another possible thing is a faulty cable somewhere in the circuit.
Check the cabling first.
Use an external pullup resistor with 4.7KOhm.
Maybe try a capacitor of about 100µF at the end of the cables
between Vcc and Gnd.
Regards
Shardan
Regards
Shardan
Shardan
-
- Normal user
- Posts: 300
- Joined: 07 Feb 2016, 11:56
Re: Device Temperature DS18B20 from flipping from 9 to 12bit
Which DS18b20 are you using? Bare chip or long black cable with stainless steel end?
The long cables with stainless steel end generally have a pull-up resister inside. Spec says the ESP8266 can supply 12mA to the GPIO pins, and max draw on the DS18B20 is 5mA, so pull-up is needed with 2 or more, but I don't know if that can change it from 9 to 12 bit...
The default for the DS18b20 is 12bit. It is possible this could be a plugin issue. I am using V144 on my NodeMCU with DS18b20 and there is no selection for resolution. I have to assume this was added more recently. I am a bit behind on firmware, I think the latest I am using is 148.....
It is possible when using multiple DS18b20, there is a problem which causes it to revert to the default. IF there is a power issue and the plug-in does not set the resolution every time it reads temperature, that might explain it as well.
Other then the silliness of using 0.0625C resolution on a device with an accuracy of 0.5C, is there any reason not to use the default of 12bit and let ESPEasy round it? Obviously it would be good to find the problem here, but the net result should be the same.
I have to assume Dallas thought this would be more accurate than it is, otherwise why have the 12bit option?
The long cables with stainless steel end generally have a pull-up resister inside. Spec says the ESP8266 can supply 12mA to the GPIO pins, and max draw on the DS18B20 is 5mA, so pull-up is needed with 2 or more, but I don't know if that can change it from 9 to 12 bit...
The default for the DS18b20 is 12bit. It is possible this could be a plugin issue. I am using V144 on my NodeMCU with DS18b20 and there is no selection for resolution. I have to assume this was added more recently. I am a bit behind on firmware, I think the latest I am using is 148.....
It is possible when using multiple DS18b20, there is a problem which causes it to revert to the default. IF there is a power issue and the plug-in does not set the resolution every time it reads temperature, that might explain it as well.
Other then the silliness of using 0.0625C resolution on a device with an accuracy of 0.5C, is there any reason not to use the default of 12bit and let ESPEasy round it? Obviously it would be good to find the problem here, but the net result should be the same.
I have to assume Dallas thought this would be more accurate than it is, otherwise why have the 12bit option?
-
- New user
- Posts: 7
- Joined: 04 Oct 2017, 18:41
Re: Device Temperature DS18B20 from flipping from 9 to 12bit
I forgot to mention: when it is switched to 12bit on its own, it is not working anymore with 2 DS18B20. So with 2 connected it is only working when choosing 9 bits. When I connect one, it is also working on 12 bits.
I use the ones with the long cable. I also use a pull-up.
I also used this 2 with same cabling with a nodemcu with lua. That was working for days. Don't know if it was using 12 or 9 bits.
For the moment I'am using it now with one DS18B20 so no problem. I will look at this later again.
I use the ones with the long cable. I also use a pull-up.
I also used this 2 with same cabling with a nodemcu with lua. That was working for days. Don't know if it was using 12 or 9 bits.
For the moment I'am using it now with one DS18B20 so no problem. I will look at this later again.
-
- Normal user
- Posts: 1156
- Joined: 03 Sep 2016, 23:27
- Location: Bielefeld / Germany
Re: Device Temperature DS18B20 from flipping from 9 to 12bit
Something is definitely broken with your circuit.
I've tested with 12 bit and 3 DS18B20:
Runs quite fine.
How did you do cabling? All sensor cables come together at the ESP or more cabling between the DS18B20 cables?
I've tested with 12 bit and 3 DS18B20:
Runs quite fine.
How did you do cabling? All sensor cables come together at the ESP or more cabling between the DS18B20 cables?
You do not have the required permissions to view the files attached to this post.
Regards
Shardan
Shardan
Who is online
Users browsing this forum: Amazon [Bot], Anthropic Claude Bot [bot], Perplexity.ai [bot] and 12 guests