12-bit/9-bit resolution ds18b20
Moderators: grovkillen, Stuntteam, TD-er
12-bit/9-bit resolution ds18b20
When i connect a single ds18b20 temperature sensor to an ESP8266 with ESPEASY R39, the temperature is measured with a 12-bit accuracy. When i connect multiple sensors on one GPIO or multiple GPIO's, the accuracy of the temperature reading is lowered to 9-bits. In some cases the first sensors still have a 12-bit accuracy, but the last sensors have 9-bit.
Do you have any idea if this is a bug, or a feature
Do you have any idea if this is a bug, or a feature
Last edited by mhoek on 23 Jan 2017, 21:16, edited 1 time in total.
Re: 12-bit/9-bit accuracy ds18b20
Hello,
You can test this version of the dallas plugins. With the one you can set the resolution (accuracy).
please tell me if it's ok and working for you.
You can test this version of the dallas plugins. With the one you can set the resolution (accuracy).
please tell me if it's ok and working for you.
- Attachments
-
- _P004_Dallas.zip
- (4.32 KiB) Downloaded 489 times
Re: 12-bit/9-bit accuracy ds18b20
I have multiple sensors running on one esp8266 with no problems.
But i recently bought a few on ebay which would only work in 9bit mode (I think they were fakes).
Luckily the seller returned my money.
But i recently bought a few on ebay which would only work in 9bit mode (I think they were fakes).
Luckily the seller returned my money.
Re: 12-bit/9-bit accuracy ds18b20
Thanks, I'll try.smagghe wrote:Hello,
You can test this version of the dallas plugins. With the one you can set the resolution (accuracy).
please tell me if it's ok and working for you.
I'm pretty sure the accuracy of the sensors isn't the problem, when i was running my own program, the temperature readings were ok.
Re: 12-bit/9-bit accuracy ds18b20
Hello
I see if my DS18B20 is working the 9-bit or 12?
I see if my DS18B20 is working the 9-bit or 12?
Re: 12-bit/9-bit accuracy ds18b20
Works like a charm!!smagghe wrote:Hello,
You can test this version of the dallas plugins. With the one you can set the resolution (accuracy).
please tell me if it's ok and working for you.
Re: 12-bit/9-bit accuracy ds18b20
Hi there, the plugin you suggested has one minor bug: Every reboot, the resolution must be set again to 12-bits.smagghe wrote:Hello,
You can test this version of the dallas plugins. With the one you can set the resolution (accuracy).
please tell me if it's ok and working for you.
I've noticed this plugin isn't compatible with R120. Do you have another version of the plugin that is compatible with R120??
Re: 12-bit/9-bit resolution ds18b20
I have made the following changes to plugin _004
The code above has been inserted before :
I think some of my sensors have been programmed in 9-bit resolution before. This was the most easy fix i think.
Code: Select all
Plugin_004_DS_reset();
Plugin_004_DS_write(0x55); // Match ROM command
for (byte i = 0; i < 8; i++)
Plugin_004_DS_write(ROM[i]); // ROM selection
Plugin_004_DS_write(0x4E); // Write Scratchpad
Plugin_004_DS_write(0x00);
Plugin_004_DS_write(0x00);
Plugin_004_DS_write(0xFF); // set 12-bit resolution
delay(50);
Code: Select all
Plugin_004_DS_reset();
Plugin_004_DS_write(0x55); // Match ROM command
for (byte i = 0; i < 8; i++)
Plugin_004_DS_write(ROM[i]); // ROM selection
Plugin_004_DS_write(0x44); // Convert T
delay(800);
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 2 guests